I've spent 2 hours searching for an answer to what seems to be a simple function so I need the help of experts. I have a mySql table of students in a school. I have a page where I list all students (by default) in the school. In the heading, I have a dropdown which allows the user to select a grade. Once the selection is made I want to call this page again passing the value selected as a variable in the url. If the url has a value in the variable I will use it in a "where" clause (this I can code). Here is my code for the dropdown box:
<td width="50%" align="left" size="15" valign="baseline">for Classroom <select size="1" name="selclass" tabindex="1">
<option selected><? echo StripSlashes($line5[stClass]); ?></option>
<?php
$query = "SELECT Value FROM tblTableV where Name='CLASS' order by Value";
$result5 = mysql_query($query);
while ($line5 = mysql_fetch_array($result5))
{
?>
<option><? echo StripSlashes($line5[Value]); ?></option>
<?
}
mysql_close($link);
?>
</select></td>
This code for the dropdown works fine. Can someone give me a simple, effective way to take the value and call the page again with the variable filled in? I'm fairly new to PHP and inexperienced in JS. Thanks for all your help.
<td width="50%" align="left" size="15" valign="baseline">for Classroom <select size="1" name="selclass" tabindex="1">
<option selected><? echo StripSlashes($line5[stClass]); ?></option>
<?php
$query = "SELECT Value FROM tblTableV where Name='CLASS' order by Value";
$result5 = mysql_query($query);
while ($line5 = mysql_fetch_array($result5))
{
?>
<option><? echo StripSlashes($line5[Value]); ?></option>
<?
}
mysql_close($link);
?>
</select></td>
This code for the dropdown works fine. Can someone give me a simple, effective way to take the value and call the page again with the variable filled in? I'm fairly new to PHP and inexperienced in JS. Thanks for all your help.