HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/nclive/technc/get_entity.php
<?php
include_once 'config.php';

$id=$_REQUEST['id'];
  
$stmt = $db->prepare("SELECT link.entity_id,link.exam_id,entity.name FROM sp_exam_links as link left join sp_exam_entity as entity on entity.id=link.entity_id where link.exam_id='$id' group by link.entity_id order by entity.display_order asc");

$stmt->execute();
$select=$stmt->fetch(PDO::FETCH_ASSOC); ?>
 	<select class="js-select2 form-control entity" name="entity<?php echo $id; ?>" style="width: 100%;" >
<?php while($row=$stmt->fetch(PDO::FETCH_ASSOC)) {  ?>
    <option value="<?php echo $row['entity_id']; ?>"><?php echo $row['name']; ?></option>
<?php }  ?>
</select>