PHP Help - Drop Down Menu With Redirect (form.submit)

//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
// PHP Help - Drop Down Menu With Redirect (form.submit)
//VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

****************************************************************
Title : Drop Down Menu With Redirect
Purpose : To post to result page automatically without submit
Programmer : Mohd Izzairi Yamin
******************************************************************

<form name=”mtnCourseAdd.php” method=”post” action=”agent_results.php”>

<select name=”AGENT” onChange=form.submit()>
<option value=”">- All Courses -</option>
<? $sql2 = “SELECT * FROM USERID order by SCOURSENAME”;
$rs2 = oraquery($sql2);?>
<?
for($r=0; $r<count($rs2); $r++) {
$code = $rs2[$r][3];
$name=$rs2[$r][2];

$selectedindex=$_REQUEST[’FCPDHOURS’];
$selectedOrNot = (($name==$selectedindex)?” selected”:”");
echo “<option value=’$name’ $selectedOrNot >$name</option>\n”;
}
?>
</select>


About this entry