<?php
include_once"../config.php";
$sid = $_GET['q'];

$q = mysqli_query($con, "select * from emirate where status = 1");
$sc = mysqli_query($con, "select * from nationailty where name = '$sid' ");
$remove = array();
while( $s = mysqli_fetch_array($sc)){
$remove[] = $s['pid'];
}

while( $a = mysqli_fetch_array($q)){
	if(in_array($a['id'], $remove)){}else{
		?>
		<option value="<?=$a['id'];?>"><?= $a['name'];?></option>
		<?php 
	}
	
}
