<?php 
include '../xpanel/inc/vt.php';

$tur =$_POST['tur'];
$id=$_POST['id'];
if($tur=="ilcegetir"){

	$ilceler = $dbh -> prepare("SELECT * FROM ilce where aktif=1 && ilce_sehirkey=? order by ilce_title");
	$ilceler-> execute(array($id));
	$ilceler = $ilceler->fetchAll(PDO::FETCH_OBJ);
	
	?>
	<option value=""> İlçe Seçiniz</option>
	
	<?php foreach ($ilceler as $ilce) { ?>
		<option value="<?=$ilce->ilce_key?>"><?=$ilce->ilce_title?></option>
	<?php }


}


if($tur=="mahallegetir"){

	$mahalleler = $dbh -> prepare("SELECT * FROM mahalle where aktif=1 && mahalle_ilcekey=? order by mahalle_title");
	$mahalleler-> execute(array($id));
	$mahalleler = $mahalleler->fetchAll(PDO::FETCH_OBJ);
	?>
	<option value=""> Mahalle Seçiniz</option>

	<?php foreach ($mahalleler as $mahalle) { ?>
		<option value="<?=$mahalle->mahalle_key?>"><?=$mahalle->mahalle_title?></option>
	<?php }


}


?>







