Re: Accessing multiple List/Menu values
| From: | Martin Clifford | Date: | Wed, 10 Jul 2002 17:04:49 +0000 |
| Subject: | Re: Accessing multiple List/Menu values | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-106877@lists.php.net to get a copy of this message | ||
Have you tried like this?
<select name="list[]" size="5" multiple>
<option value="yahoo">Yahoo!</option>
...
<option value="phpnet">PHP.net</option>
</select>
Then access the array on the processing page.
Martin
>>> "Joseph Szobody" <jszobody@excite.com> 07/10/02 02:02PM >>>
This is sorta OT, but involves PHP.
I have a fairly large List/Menu on a form, which allows for multiple selections. I want users to be
able to use cntrl/shift-click to select a bunch of items. Let's say this List is called
'list'. Now when I submit the form, how does the processing script access all these
different values in 'list'? If I try to echo '$list' it only show *one* of the
selected items from the list. I've tried treating it as an array ($list[0], $list[1], etc), but
that doesn't work either.
How do I get at the different values?
Thanks,
--
: Joseph Szobody :
"Computers are like airconditioners: They stop working properly if you open windows."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php