<?php
include ("include/db-connect.php");

$q=$_GET["q"];

 $sql="SELECT * FROM  ".$SUBCAT."  WHERE cat_name = '".$q."'";

$result = mysql_query($sql);

?>
<select name="sub_cat" onchange="showcity(this.value)">
<option value="">Select Subcategory</option>
<?php
while($row = mysql_fetch_array($result))
{
?>	
<option value="<?php echo $row['id']; ?>"><?php echo $row['subcat']; ?></option>
<?php
}
echo "</select>";
?>

