Re: Need to POST multiple values with single name
| From: | Richard Lynch | Date: | Fri, 27 Apr 2007 19:16:07 +0000 |
| Subject: | Re: Need to POST multiple values with single name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-254007@lists.php.net to get a copy of this message | ||
On Fri, April 27, 2007 3:02 am, Maxim.Sedelnikov@asplinux.ru wrote:
> 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.
PHP will cheefully accept POST data with arrays with keys.
<input name="foo[42]" value="forty-two" />
<input name="foo[15]" value="fifteen" />
<input name="foo[banana]" value="yes, please" />
var_dump($_POST['foo']);
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?