<form>
<table border="0" width="100%">
<tr>
<td align="right" width="60%"><select name="select" size="1" >
<option>Select Category</option>
<? $sql1=mysql_query("select name from categories") or die(mysql_error());
$num=mysql_num_rows($sql1);
while($row=mysql_fetch_array($sql1))
{
$category = $row['name'];
?>
<option><?php echo $category; ?></option>
<?
}
?>
</select>
</td>
</tr>
</table>
</form>
Here i got i.e. it display
in list student, teacher ,professor etc.
i want to do like when click on any option without press button
only click on option in list
they fire query
select * from table where name='student'; // i.e. selected value from list
my problem is how to check that option is select or not
or get the selected value ??