You are here: Re: need help with $_POST variables « PHP Programming Language « IT news, forums, messages
Re: need help with $_POST variables

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация