note 18172 added to function.stripslashes

From: Date: Sat, 12 Jan 2002 22:29:17 +0000
Subject: note 18172 added to function.stripslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-24759@lists.php.net to get a copy of this message
try this in conjunction with stripslashes for form to form data tossing with magic quotes on: htmlspecialchars fails because it will then translate the ampersands into &amps; so use this instead: $apos = "'"; $quot = """; if($products){ while (list ($key, $val) = each($products)) { $products[$key] = str_replace("'",$apos,stripslashes($val)); $products[$key] = str_replace('"',$quot,stripslashes($val)); } reset($products); } peace, love and crackiness http://www.dross.com -- http://www.php.net/manual/en/function.stripslashes.php http://master.php.net/manage/user-notes.php?action=edit+18172 http://master.php.net/manage/user-notes.php?action=delete+18172 http://master.php.net/manage/user-notes.php?action=reject+18172

« previous php.notes (#24759) next »