RE: [PHP] quick review: http variable gathering
| From: | Maxim Maletsky | Date: | Tue, 17 Oct 2000 06:22:03 +0000 |
| Subject: | RE: [PHP] quick review: http variable gathering | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-20543@lists.php.net to get a copy of this message | ||
a very good suggestion..
-----Original Message-----
From: Matthias Endler [mailto:endler@upsys.de]
Sent: Tuesday, October 17, 2000 3:17 PM
To: PHP-GENERAL
Subject: RE: [PHP] quick review: http variable gathering
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