<?php



include 'connect.php';



if($_GET['department'])



{



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



$sql=mysql_query("SELECT * from employee_designation where department='$department' order by ID asc") or die(mysql_error());



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

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



while($result=mysql_fetch_array($sql))



{



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



}



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





}



?>