Hi All,
My first day at school 🙂
I have a table which contains group Id, student Id and student name.
In my page I am trying to populate two drop downs,
one containing groupId as value
<option value="1">1</option>
and another containing the student id as value
<option value="1">Harry</option>
I was able to connect the database and get the data
$sql = "select groupNo as groupNo, StudentName as studentName, StudentNo as studentNo from groups";
$result = mysql_query($sql);
. I was able to populate the group Id so my first drop down got populated perfectly.
Now how do I populate the second drop down?[$result returned nothing, I guess I cant read the variable one more time?]. Also upon selecting the group Id , the second drop down has to filter students belonging to that group.[javascript will do this, but I need a link between the drop down values]
How to go about this? Any help is appreciated.