note 29931 added to function.addslashes

From: Date: Sat, 01 Mar 2003 03:17:38 +0000
Subject: note 29931 added to function.addslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-44685@lists.php.net to get a copy of this message
Forget my previous message, steve at teamITS dot com's functions reslash and deslash work right, it's just i didn't understand those queries ARE backslashed like this : INSERT INTO tests (text) VALUES ('It\'s only a test \\o/'); and entries in database look like this : 'It's only a test \o/' This works just well when magic_quote_gpc = OFF In the other hand with magic_quote_gpc = ON u don't need to addslashes() queries, like that : INSERT INTO tests (text) VALUES ('It's only a test \o/'); but ur entries in database look like this : 'It\'s only a test \\o/' ,then u need to stripslashes this if u want to use the data later. -- http://www.php.net/manual/en/function.addslashes.php http://master.php.net/manage/user-notes.php?action=edit+29931 http://master.php.net/manage/user-notes.php?action=delete+29931 http://master.php.net/manage/user-notes.php?action=reject+29931

« previous php.notes (#44685) next »