This is the correct form: <select multiple type="select" name="choices[]"> <option value="1">Option 1</option> <option value="2">Option 2</option> </select>
When the above is submited, $_POST['choices'] will be an array that contains the selected options. If you have register_globals = On in your php.ini, $choices will also be an array of selected options. > -----Original Message----- > From: Dash McElroy [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 11:30 AM > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] Handling Multi-Select form lists > > > I have a field like this as well. I believe you have to make > the variable name with brackets at the end like this: > > <input type=multiple (or however that works) > name=multi_select[] blah blah> > > That seems to do the trick. It'll make the variable > multi_select an array (obviously). > > -Dash > > -----Original Message----- > From: R.S. Herhuth [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 11:30 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Handling Multi-Select form lists > > > > I am using a multi-select form list...how do I go about > retrieving the multiple values? My current script only pulls > the first value using: > > $_POST['multi_select']; > > Thanks, > Ron > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php