NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_POST

Christopher R. Merlo cmerlo at turing.matcmp.ncc.edu
Sat May 24 00:07:28 EDT 2003


On 2003-05-24 00:02 -0400, Aaron Fischer <agfische at email.smith.edu> wrote:

> Hi all,
> 
> Relative newbie with my first post.  
> 
> I want to take the values of $_POST that are coming from a form and
> convert them to a string.  I was attempting to scroll through the array
> using while(list) and concatenate each new value to a string variable
> but have been unsuccesfull so far.  I could some help with ideology
> and/or code examples.

You will probably be happier with something like:

foreach( $_POST as $key=>$value ) {
  $string .= $value . " ";
}

Also, if you disable globals (generally a good idea), $_POST won't
work anymore.  Replace with $HTTP_POST_VARS.

HTH.
-c

-- 
cmerlo at turing.matcmp.ncc.edu        http://turing.matcmp.ncc.edu/~cmerlo

A five-year-old could understand this!  Fetch me a five-year-old!



More information about the talk mailing list