I am having difficulty getting my dynamic select box to work. It is
generating the select box just the way I want it to (displaying only
the results of my query in the pulldown), but once I select one of the
schools, the value is always "school_name".
Can someone look at the syntax and tell me where I have gone wrong?
$query = ("SELECT school_name FROM school_info where county_name =
'".$county)."'";
$result = mysql_query($query);
if (!$result)
{
echo "Error performing query: ";
echo mysql_error();
}
echo "<b>School</b>  ";
echo "<select name=\"school\">";
while(list($school_name)=mysql_fetch_array($result ))
{
$school_name = stripslashes($school_name);
echo "<option value=\"school_name\">$school_name</option>";
}
echo "</select>";