Re: HTTP_POST_VARS and Arrays
| From: | Rasmus Lerdorf | Date: | Tue, 04 Jul 2000 16:18:05 +0000 |
| Subject: | Re: HTTP_POST_VARS and Arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4767@lists.php.net to get a copy of this message | ||
> Like this
>
> <form action=test.php method=POST>
> <select name=blah[] MULTIPLE>
> <option value=1>One</option>
> <option value=2>Two</option>
> <option value=3>Three</option>
> </select>
> </form>
>
> If you dont select one of the options $blah will not show up on test.php
> at all.
>
> Its pretty weird, thats why i asked.
Ah, I was thinking of a standard non-multiple SELECT tag where it isn't
possible not to have a value. For a select multiple, it obviously
is. And your browser doesn't actually send anything if you don't select a
value. PHP has no way of knowing that this select field is present, so
the behaviour is quite correct.
-Rasmus