<?php



include 'connect.php';



if($_GET['category'])



{



$category=$_GET['category'];



$sql=mysqli_query($conn,"SELECT * from product where category='$category' order by product asc") or die(mysqli_error($conn));



echo '<div><div id="material">

<option value="" selected="selected">Select Product</option>';



while($result=mysqli_fetch_assoc($sql))



{



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



}



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





}



?>