|
Posted by ZeldorBlat on 09/20/06 13:09
Jerry Stuckle wrote:
> admin@worstofboston.com wrote:
> >>I am getting this error:
> >>
> >>
> >>Warning: Wrong parameter count for curl_setopt() in D:\ULEM
> >>WebSite\forms\middle.php on line 5 (This is the code above that you
> >>wrote)
> >>Message was not sent
> >>Please tell the Administrator: Mailer Error: Could not instantiate mail
> >>function.PHP Warning: Cannot open 'C:\\Program Files\PHP\extras' for
> >>reading in Unknown on line 0
> >
> >
> > I have been told that CURLOPT_POSTFIELDS expects a string, so $_POST
> > will not work??? It also happens that many elements of my $_POST array
> > are arrays...
> >
> > I am in over my head here...
> >
> > I apologize for all the questions...
> >
>
> No, you can't use arrays - but then you can't send a PHP array in a
> header, anyway. You'll have to parse your $_POST array out into id/value
> pairs, just like you would see in a GET with parameters.
>
It depends on which version of PHP and curl you are using. Some will
let you just give it an array. You can always use http_build_query()
to make the conversion easy:
http://www.php.net/http_build_query
Navigation:
[Reply to this message]
|