<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h2>Student Clearance Information</h2>
<form action="students_clearance.php" method="post" name="form1">
<table>
<tr>
<td> Department Id:</td>
<td> <select id="Select1" name="department" >
<option>Select Department</option>
<option value="IIT">
IIT
</option>
<option "IMS">
IMS
</option>
<option "BSChe">
BSChe
</option>
<option "BSPhy">
BSPhy
</option>
</select> </td>
</tr>
<tr>
<td> Registration No:</td>
<td> <div id="regdiv"><select name="registration">
<option value="">Select Registration</option>
<?php
$depart='department'.value;
$con=mysql_connect("localhost:3307","root","kust");
if(!$con)
{
die("Some problems occured during making connection with mysql".mysql_error());
}
?>
<?php
$bd_con= mysql_select_db("kustkht",$con);
if(!$bd_con)
{
die("Some problems occured during selecting DataBase from MySQL".mysql_error());
}
?>
<?php $qry = mysql_query("select registrationNo from students where department='$depart' ORDER BY departmentName ASC"); while ($row = mysql_fetch_array($qry)) { ?>
<?php echo ("<option value = '" . $row['departmentName'] . "'>" . $row['departmentName'] . "</option>");?>
<?php }
?>
<?php
mysql_close($con)
?>
</select>
</div></td>
</tr>
<td> Date:</td>
<td> <input type="text" name=" Date" value="" /></td>
</tr>
<tr>
<td> Clearance</td>
<td> Yes <input type="radio" name="clearance" value="Yes"/> No <input type="radio" name="clearance" value="No"/></td>
<td> </td>
</tr>
<tr>
<td> Remarks About Clearance: </td>
<td> <textarea name="RemarksClearance" rows="10" cols="50"></textarea> </td>
</tr>
<tr>
<td><br/>     <input type="submit" value="Submit"/> </td>
</tr>
</table>
</form>
</body>
</html>
as mention department dropdown is client side,,, when selecting client side value from drop down it show me relavent record,,, and without button submit,,, so i dont know how to do it,,,,