<?php
include("../../config/database.php");
$conct  = new connectionCreat();
$conct->connectToDB();
$conct->selectDB(); 
$state_id			= $_GET['state_id']; 
$town_id			= $_GET['town_id']; 
$sql				= mysql_query("SELECT * FROM `tbl_distributor` where `state_id`='$state_id' and `town_id`='$town_id' order by `name` ASC")or die(mysql_error());
echo "<option value=''>Select Level</option>";
if(mysql_num_rows($sql)>0)
{
	while($row			= mysql_fetch_array($sql))
	{
	?>
		<option value="<?php echo $row['id'];?>"><?php echo $row['name'];?></option>
	<?php 
	}
} 
else
{
	echo "0";
}
mysql_close();
?>