<tr>
<td><strong>Department</strong></td>
<td width="220" align="right">
<select name="Depcategory" dir="rtl" id="Depcategory" class="title">
<option value="-1">chosse department</option>
<?php
$rs=$db->GetAllDepCategory($_SESSION["Faculty"]);
while(list($name)=mysql_fetch_array($rs)){
echo "<option ".($DepSearch==$name?" selected=selected ":"")." value='$name'>$name</option>";
}
?>
</select>
</td>
</tr>
<tr> <td> <strong>Teacher name</strong></td>
<td width="200" align="right"><label for="TeacheSearch"></label><select name="TeacheSearch" dir="rtl" id="TeacheSearch" class="title">
<option value="-1">choose teacher</option>
<?php
$rs=$db->GetTeacher($_SESSION["Faculty"], $_SESSION["AdminWorkName"]);
while(list($Fname,$WNO,$Lname)=mysql_fetch_array($rs)){
echo "<option ".($Lname==$TeacheSearch?" selected='selected' ":"")." value='$Lname'>$Fname $WNO</option>";
}?>
</select>
</td>
</tr>
Hello,
I've this code and i need to fix it so when i change the value of the first select, the values at the second select will change according to the value i did choose at the first select..
for example, if i've choosed IT as department from the first select, at the second select teachers at IT depramtent will be displayed.
"the values at both select are delievred from the database.."
thanks..