<?php

include 'connect.php';

if($_GET['category'])

{

$category=mysql_real_escape_string($_GET['category']);

$sql=mysql_query("SELECT * from product where category='$category' order by product asc") or die(mysql_error());

echo '<div><div id="material">
<option value="" selected="selected">Select Product</option>';

while($result=mysql_fetch_array($sql))

{

echo '<option value="'.$result['ID'].'">'.$result['product'].'</option>';

}

echo '</select></div></div>';


}

?>