Re: storing single and double quote in MySQL

From: Date: Mon, 22 May 2006 16:36:49 +0000
Subject: Re: storing single and double quote in MySQL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-236649@lists.php.net to get a copy of this message
On 5/22/06, afan@afan.net <afan@afan.net> wrote:
Hi to all! After the form is submitted, some fields are filled with single and/or double quote info (like: 1'2"x2'4", or sky's blue, or "cool" stuff). I validate what I got using mysql_real_escape_string() and then store the result in MySQL. And, it will be stored as:1\'2\"x2\'4\", and sky\'s blue, and \"cool\" stuff. Is this correct way or "correct" way will be to convert quotes in html entities? If yes, means have to use htmlentities($Size, ENT_QUOTES)? Thanks for any thoughts! -afan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Looks like you're having a problem with magic quotes. Look at the examples:
http://us2.php.net/manual/en/function.get-magic-quotes-gpc.php

« previous php.general (#236649) next »