[thelist] Drop down box resets after "Submit"
Rob Smith
rob.smith at THERMON.com
Thu Jun 10 13:18:34 CDT 2004
<snip>
Is there a way I can make the form remember the user's choice so that it
displays in the drop down after submit has been clicked?
</snip>
Yup.
Form:
...
<select name="mySelect">
<option value="A" <?php if ($_GET["mySelect"] == "A") echo "selected";
?>>A</option>
...or...
<option value="A" <?php if ($_POST["mySelect"] == "A") echo "selected";
?>>A</option>
</select>
...
HTH,
Rob
More information about the thelist
mailing list