Re: storing single and double quote in MySQL

From: Date: Mon, 22 May 2006 19:54:11 +0000
Subject: Re: storing single and double quote in MySQL
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-236658@lists.php.net to get a copy of this message
On Mon, May 22, 2006 11:37 am, Brad Bonkoski wrote: > http://www.php.net/manual/en/function.stripslashes.php > if you have to dump that information back to the users. If you are using http://php.net/stripslashes on data coming out of your database, you are DEFINITELY doing something wrong acquiring that data. Stripslashes is "correctly" used ONLY when: 1. You have Magic Quotes on, and 2. You need to display/use the incoming data for something other than MySQL in the same script that does the INSERT Even then, you really ought to turn off Magic Quotes and migrate to http://php.net/mysql_real_escape_string -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#236658) next »