Re: problem with ' or "

From: Date: Wed, 24 Aug 2005 05:38:24 +0000
Subject: Re: problem with ' or "
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-221223@lists.php.net to get a copy of this message
George B wrote:
I made a script that posts data into a database but it has a problem whenever I enter a ' or a ". How do I bypass this problem?
If it is MySQL, use mysql_real_escape_string() [1]. If any other database, have a look in the PHP manual [2] for the relevant function, or as a last resort use addslashes(). Jasper [1] http://www.php.net/mysql_real_escape_string [2] http://www.php.net/docs.php

« previous php.general (#221223) next »