Re: magic_quotes

From: Date: Thu, 30 Nov 2006 17:18:38 +0000
Subject: Re: magic_quotes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-245357@lists.php.net to get a copy of this message
On 11/30/06, Johannes Lindenbaum <johannes@jlindenbaum.de> wrote:
And on retrieval stripslashes().
You shouldn't have to stripslashes your data coming from the DB. Addslashes and friends exist to escape your data. It is not part of your data. So when you INSERT "Jingle\'s Bells" when you retrieve it you should have "Jingle's Bells" not "Jingle\'s Bells" because \ was syntax to escape the single quote.

« previous php.general (#245357) next »