<?php
	
	$qryx=mysqli_query($mysqli,"SELECT * FROM m_kecamatan WHERE id_kecamatan ='$_GET[id_kec]'");
	$datax=mysqli_fetch_array($qryx);



	$qry=mysqli_query($mysqli,"SELECT * FROM m_desa WHERE id_kecamatan='$_GET[id_kec]' ORDER BY nama_desa ASC");

	echo "<h1 align='center'>Nama Kecamatan: $datax[nama_kecamatan]</h1>";
	echo "<h4>Daftar desa untuk kecamatan ini:</h4>";
	
	if(mysqli_num_rows($qry)>0){
		
		$no=1;
		echo "<ol>";
		while($data=mysqli_fetch_array($qry)){
			echo "<li><a href='index.php?page=detail_desa&id=$data[id_desa]'>$data[nama_desa]</a></li>";
		}
		echo "</ol>";

		echo "<br/><br/>&nbsp;";
		
		
	}else{
	
		echo "Belum ada data desa untuk kecamatan ini...";
	}
?>