RE: [PHP] multiple selects and $_POST['vars']
| From: | Jay Blanchard | Date: | Thu, 06 Jun 2002 17:17:21 +0000 |
| Subject: | RE: [PHP] multiple selects and $_POST['vars'] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100959@lists.php.net to get a copy of this message | ||
[snip]
<form method="post" action="blah.php">
<select multiple name="bleh">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</form>
[/snip]
Change this like follow;
<form method="post" action="blah.php">
<select multiple name="bleh">
<option name="a_name" value="1">1</option>
<option name="a_name" value="2">2</option>
<option name="a_name" value="3">3</option>
<option name="a_name" value="4">4</option>
<option name="a_name" value="5">5</option>
</select>
The value selected is now in $a_name
HTH!
Jay
"Give a man a program, frustrate him for a day.
Teach a man to program, frustrate him for a lifetime."