Hi
I really need some guidance, new to this stuff.
My basic problem is
I have two dropdown lists on a page.
When I select an option in dropdown one
the values in drop down two will depend on what option is selected in dropdown one
Is it possible to do this without Javascript if not could someone please help me
Very frustrated.
Example
// DROP DOWN ONE
echo'<tr>
<td colspan="2" class="labelcell"><label for="secondary_exam_id">
Select Exam:</label></td>';
echo'<td colspan="2" class="fieldcell2"> <select name="secondary_exam_id">';
$query_result = mysql_query ('SELECT * FROM secondary_exam_type ORDER BY secondary_exam_id');
while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
echo "<option value=\"$row[0]\">$row[1]</option>\n";
}
echo'</select></td>';
echo'</tr>';
// DROP DOWN TWO
echo'<tr>
<td colspan="2" class="labelcell"><label for="junior_subject_id">
Select Subject:</label></td>';
echo'<td colspan="2" class="fieldcell2"><select name="junior_subject_id">';
$query_result = mysql_query ('SELECT * FROM junior_subjects ORDER BY junior_subject_id');
while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
echo "<option value=\"$row[0]\">$row[1]</option>\n";
}
echo'</select></td>';
echo'</tr>';
Tks in advance
Gaz
I really need some guidance, new to this stuff.
My basic problem is
I have two dropdown lists on a page.
When I select an option in dropdown one
the values in drop down two will depend on what option is selected in dropdown one
Is it possible to do this without Javascript if not could someone please help me
Very frustrated.
Example
// DROP DOWN ONE
echo'<tr>
<td colspan="2" class="labelcell"><label for="secondary_exam_id">
Select Exam:</label></td>';
echo'<td colspan="2" class="fieldcell2"> <select name="secondary_exam_id">';
$query_result = mysql_query ('SELECT * FROM secondary_exam_type ORDER BY secondary_exam_id');
while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
echo "<option value=\"$row[0]\">$row[1]</option>\n";
}
echo'</select></td>';
echo'</tr>';
// DROP DOWN TWO
echo'<tr>
<td colspan="2" class="labelcell"><label for="junior_subject_id">
Select Subject:</label></td>';
echo'<td colspan="2" class="fieldcell2"><select name="junior_subject_id">';
$query_result = mysql_query ('SELECT * FROM junior_subjects ORDER BY junior_subject_id');
while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
echo "<option value=\"$row[0]\">$row[1]</option>\n";
}
echo'</select></td>';
echo'</tr>';
Tks in advance
Gaz