IL PROTECTED]>
Sent: Saturday, July 07, 2001 1:09 AM
Subject: RE: [PHP] How to apply something to every variable
>
>
> foreach($HTTP_POST_VARS as $k=>$v) {
> $$k = addslashes($v);
> }
>
>
>
> - Maxim Maletsky
>
> PS: no, not trying to win over, just trying
The true point of that snippet was to apply something to all my variables.
Plus, not all servers have that option on :>
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 7:49 AM
Subject: Re: [PHP] How to apply something to
Hi Chris!
On Fri, 06 Jul 2001, Chris Anderson wrote:
> I was playing around trying to find a way to addslashes() to all my
> variables, and I came up with this snippet. Hope it helps someone
>
why don't you turn on magic_quotes_gpc then?
> $keys = array_keys($HTTP_POST_VARS);
> $post_size = s
:11 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] How to apply something to every variable
while (list($key, $val) = each ($HTTP_POST_VARS)) {
${$key} = addslashes($val);
}
- Russ
-Original Message-
From: Chris Anderson [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06,
Fine, just outdo me =)
- Original Message -
From: "Chadwick, Russell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 6:10 PM
Subject: RE: [PHP] How to apply something to every variable
>
> while (list($key, $val) = each (
while (list($key, $val) = each ($HTTP_POST_VARS)) {
${$key} = addslashes($val);
}
- Russ
-Original Message-
From: Chris Anderson [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 3:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to apply something to every variable
I was
I was playing around trying to find a way to addslashes() to all my variables, and I
came up with this snippet. Hope it helps someone
$keys = array_keys($HTTP_POST_VARS);
$post_size = sizeof($keys);
for($x = 0; $x < $post_size; $x++)
{
$temp = $keys[$x];
//you can replace addslashes with w
7 matches
Mail list logo