RE: [PHP] quick review: http variable gathering
| From: | Philip Olson | Date: | Tue, 17 Oct 2000 06:24:39 +0000 |
| Subject: | RE: [PHP] quick review: http variable gathering | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20545@lists.php.net to get a copy of this message | ||
> what about when $HTTP_*_VARS contains an array?
> Hint: you'd get 'Array' as output but no data.
ahh yes mathias, good point. i did not think of this for basic forms but
alas, it should be taken into account for uberformprocessor to exist!
thanks,
philip
> Hi Philip,
>
> > <snip>
> >
> > if ($HTTP_POST_VARS) {
> > while ($post = each ($HTTP_POST_VARS)) {
> > $mail .= stripslashes($post[key]).' :
> > '.stripslashes($post[value])."\n";
> > }
> > }
> > if ($HTTP_GET_VARS) {
> > while ($get = each ($HTTP_GET_VARS)) {
> > $mail .= stripslashes($get[key]).' :
> > '.stripslashes($get[value])."\n";
> > }
> > }
> >
> > </snip>
> >
> > again, it works but is it optimal? i'm paranoid because once done i'll be
> > using this for all my mail forms as it's meant to be very generic and
> > "always" work. get or post. and i don't want to miss any important data!
>
> what about when $HTTP_*_VARS contains an array?
> Hint: you'd get 'Array' as output but no data.
>
> Cheers,
> Matthias
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>