<form name=update_form method=post target=_self>
<input type="hidden" name="statustype" value="<?php echo $statustypepassed; ?>">
<<select name=statustypepassed size=1 onchange=document.update_form.submit()>
<?php
$db = mysql_connect("localhost");
mysql_select_db("database",$db);
$result=mysql_query("select distinct statustype from statuslist",$db);
while($myrow=mysql_fetch_array($result))
{
$statustype=$myrow["statustype"];
echo "<option";
if ($statustype == $statustypepassed) { echo " selected";}
echo ">$statustype</option>"; }
echo "</select></td>";
?>
Status Detailed:
<select name=statusdetailedpassed size=1()>
<?php
$db = mysql_connect("localhost");
mysql_select_db("nwabpscp",$db);
$result=mysql_query("select statusdetailed from statuslist where statustype='$statustypepassed'",$db);
while($myrow=mysql_fetch_array($result))
{
$statusdetailed=$myrow["statusdetailed"];
echo "<option";
if ($statusdetailed == $statusdetailedpassed) { echo " selected";}
echo ">$statusdetailed</option>"; }
echo "</select></td>";
?>
<tr><td> <input type="Submit" name="submit" value="Update Record">
</form>
There is no action in the form tag, so that the page refreshes itself.The problem is I can't have
onchange=document.update_form.submit()
AND a submit button
how can i make the drop downs refresh the page, and the submit button collects the variables and takes me elsewhere?
Andy