RE: [PHP] quick review: http variable gathering
| From: | Matthias Endler | Date: | Tue, 17 Oct 2000 06:16:47 +0000 |
| Subject: | RE: [PHP] quick review: http variable gathering | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20539@lists.php.net to get a copy of this message | ||
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