Re: FW: [PHP] Need to POST multiple values with single name
| From: | Zoltán Németh | Date: | Fri, 27 Apr 2007 08:19:47 +0000 |
| Subject: | Re: FW: [PHP] Need to POST multiple values with single name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253956@lists.php.net to get a copy of this message | ||
2007. 04. 27, péntek keltezéssel 04.14-kor Buesching, Logan J ezt írta:
> 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.
I think he's not using a form but tries to construct the POST request
from php
then it would be possible to put a sub-array of fields into
http_post_fields() or not?
greets
Zoltán Németh
>
> 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
>