RE: [PHP] Special characters --> single quote
| From: | James Moore | Date: | Tue, 22 Aug 2000 14:06:16 +0000 |
| Subject: | RE: [PHP] Special characters --> single quote | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12943@lists.php.net to get a copy of this message | ||
> Hope you are well slept James ... :-)))))
>
> This function addslashes add a slash before special characters
> like " or '.
> So when I use your query, each double quote have a slash before (
> like this...
> test zqkfzerz\"\" h\"h ) when recording
> --> not very interesting to record this in a database.
> and for the single quote, I have got always the same error = My
> database show
> me a message errors
> which indicates there is an incorrect syntax.
>
You should also use stripslashes when getting data from the database.
http://www.php.net/manual/function.addslashes.php
and
http://www.php.net/manual/function.stripslashes.php