Hi all,
I have a problem with a script I'm writing.
I want PHP to tell me the ID of the option selected in a menu.
I have the following menu in my form:
<form method="post" action="test.php">
<select name="gender">
<option id="1">Male</option>
<option id="2">Female</option>
</select>
<input type="submit" value="Go">
</form>
What I want PHP to do when going to test.php is to see what the ID was of the selected option, like if option 1 was selected it should echo "You selected option 1", where the 1 is the id of the option.
How can this be done ?