FW: [PHP] Need to POST multiple values with single name
| From: | Buesching, Logan J | Date: | Fri, 27 Apr 2007 08:14:38 +0000 |
| Subject: | FW: [PHP] Need to POST multiple values with single name | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-253954@lists.php.net to get a copy of this message | ||
Just make sure you use []'s in your name, such as:
<select multiple="multiple" name="bob[]">
Then it will fill $bob as an array, instead of a string.
http://us2.php.net/manual/en/faq.html.php#faq.html.arrays
-Logan
> -----Original Message-----
> From: Maxim.Sedelnikov@asplinux.ru
[mailto:Maxim.Sedelnikov@asplinux.ru]
> Sent: Friday, April 27, 2007 4:02 AM
> To: php-general@lists.php.net
> Subject: [PHP] Need to POST multiple values with single name
>
> Need to POST multiple values with single name.
>
> Ex.
> -----------------------------55751342416306771991025074398
> Content-Disposition: form-data; name="licenses"
>
> lic1
> -----------------------------55751342416306771991025074398
> Content-Disposition: form-data; name="licenses"
>
> lic2
>
>
> Function http_post_fields() cannot be used due to an _associative_
array
> of POST values.
>
> Any ideas?
>
> Maxim <sms@asplinux.ru>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php