note 18172 deleted from function.stripslashes by aidan

From: Date: Sun, 29 Aug 2004 10:24:03 +0000
Subject: note 18172 deleted from function.stripslashes by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-75543@lists.php.net to get a copy of this message
Note Submitter: NO_SPAM at dross dot com ---- 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); }

« previous php.notes (#75543) next »