Re: HTTP_Clients and Files - Part 2
| From: | Justin Patrin | Date: | Wed, 17 Nov 2004 22:05:46 +0000 |
| Subject: | Re: HTTP_Clients and Files - Part 2 | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.general php.pear.general |
| Request: | Send a blank email to pear-general+get-15612@lists.php.net to get a copy of this message | ||
On Wed, 17 Nov 2004 15:12:33 -0500, Andrew Nagy <asnagy@webitecture.org> wrote:
> Justin Patrin wrote:
>
>
> > On Wed, 17 Nov 2004 12:12:38 -0500, Andrew Nagy <asnagy@webitecture.org> wrote:
> >>Anyway, my new question is how do i send an array of data in a post or
> >>get method? For example, if the form that I am submitting to has a set
> >>of checkboxes that are all the same name.
> >>
> >>$client->post($url, array('sessionid' => 'abc123',
> >>'options' =>
> >>array('1', '3', '7')));
> >>
> >
> >
> > Hmmm... It's not really HTML compliant to have multiple checkboxes
> > with the same name. It *is* possible with HTTP_Request using
> > addRawPostData. I don't know if it's possible with HTTP_Client.
> >
>
> Sure it is. Take a look at:
> http://www.w3.org/TR/html4/interact/forms.html#checkbox
>
> "Several checkboxes in a form may share the same control name. Thus, for
> example, checkboxes allow users to select several values for the same
> property. The INPUT element is used to create a checkbox control."
Hmmm..is it valid for XHTML?
>
> I will try the addRawPostData and see what I can do.
>
--
Justin Patrin