quick review: http variable gathering

From: Date: Tue, 17 Oct 2000 05:40:00 +0000
Subject: quick review: http variable gathering
Groups: php.general 
Request: Send a blank email to php-general+get-20524@lists.php.net to get a copy of this message
hi all- i'm creating a new mail form processor for myself and would like you to judge my variable gathering technique. it takes all form values and sticks them into my $mail which is later sent via mail(). is this optimal? any 'tricks' i should be aware of ? here it is : <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! btw, without the if checks, only post worked and not get. tia, philip -- be outside the box.

« previous php.general (#20524) next »