
	<?php
$db = new mysqli('localhost', 'kiosbarc_antrian_online' ,'kiosbarc_antrian_online2019', 'kiosbarc_antrian_online');
$kode_wilayah = $_GET['kode_wilayah'];
if($kode_wilayah=='all'){
	$all='aal';
	$nama_cabang = mysqli_query($db,"SELECT id,nama_cabang FROM kode_cabang order by nama_cabang");
}else{
$all='all';
$nama_cabang = mysqli_query($db,"SELECT id,nama_cabang FROM kode_cabang WHERE kode_wilayah = '$kode_wilayah' order by nama_cabang");
}

echo "<option value=''disabled selected>--Pilih Cabang--</option>";
echo "<option value=$all$kode_wilayah>Semua Cabang (ALL)</option>";
while($k = mysqli_fetch_array($nama_cabang)){
    echo "<option value=$k[id]>$k[nama_cabang]</option> \n";
}
?>