lundi 9 mars 2015

problems on dynamic dropdown lists


Vote count:

0




I am currently working on a a drop down list which fetch all college names in my college table I was wondering how can I make a another drop down list in which it fetches all departments in the currently selected collage name without using a form (for the page must not reload during the process.


There are two tables involved one is for the departments and other is for college


this is a sample code from the first drop down list.



<tr>
<th class="text-success">College:</th>
<td>
<select name = "AdminUpdateCollageID" class ="bg-info" name>
<option>Please choose a college </option>
<option>
<?php
$sql = mysql_query("SELECT * FROM colleges")
or die("NO table selected" . mysql_error());
while($rw = mysql_fetch_array($sql)){
echo $rw['College_Name'] ; //this displays the values in the dropdown

}
?>
</option></select>

</td>
</tr>


I'l Try to upload the two tables this is the first time I post a question on stackoverflow also I am still a student please bear with me any help will be very appreciated.



asked 1 min ago







problems on dynamic dropdown lists

Aucun commentaire:

Enregistrer un commentaire