note 29866 added to function.addslashes

From: Date: Thu, 27 Feb 2003 05:23:15 +0000
Subject: note 29866 added to function.addslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-44591@lists.php.net to get a copy of this message
u forgot the ! in the deslash function : function reslash($string) { if (!get_magic_quotes_gpc()) $string = addslashes($string); return $string; } function deslash($string) { if (!get_magic_quotes_gpc()) $string = stripslashes($string); return $string; } Very handfull functions btw :) It's odd coze with magic_quotes_gpc = Off and thoses functions, entries in database aren't "slashed" but queries are.. -- http://www.php.net/manual/en/function.addslashes.php http://master.php.net/manage/user-notes.php?action=edit+29866 http://master.php.net/manage/user-notes.php?action=delete+29866 http://master.php.net/manage/user-notes.php?action=reject+29866

« previous php.notes (#44591) next »