Posted by P Pulkkinen on 02/06/07 14:36
"Sonnich" <sonnich.jensen@elektrobit.com> kirjoitti
viestissδ:1170772126.596200.67550@s48g2000cws.googlegroups.com...
> Can anyone give me a quick hint for this?
> Say, I have: <SELECT NAME="opt3" SIZE="15" multiple>
> Then I'd like to list the items selected...
> echo $_POST["opt3"];
> but this gives only the first one
> how do I get the rest?
<SELECT NAME="opt3()" SIZE="15" multiple>
Parenthesis is the point: NAME="opt3()"
Then php knows than an array is coming. This is not because html would
require that, but because php does. This applies not only to select
elements, but checkboxes as well for example. Or sometimes you may want to
send some array in hidden fields.
Navigation:
[Reply to this message]
|