Have you echo'd the variables before the addslashes() call, to be sure that
the stripslashes() call is being executed?
Kirk
-Original Message-
From: John Kelly [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 23, 2002 12:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Stripslashes
Hi, can someone tell me why the following results in evaluated variables
with 2 slashes in front of apostrophys instead of one and how I can modify
it to only add 1? Thanks!
foreach($_POST as $k=$v){
if (get_magic_quotes_gpc()){
$_POST[$k] = stripslashes($v);
}
$_POST[$k] = addslashes($v);
eval(
2 matches
Mail list logo