Re: Is there any method to filter the single quote from astring?
| From: | Justin French | Date: | Sat, 21 Dec 2002 07:02:31 +0000 |
| Subject: | Re: Is there any method to filter the single quote from astring? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129050@lists.php.net to get a copy of this message | ||
on 21/12/02 2:00 PM, Alexander Guevara (alexanderguevara@hotmail.com) wrote:
> It works.. but when you retrieve the data from the database to a text box it
> doesnt appear if it has the single quote ('), o tought it was cause i have
> the stripslashes but i delete stripslashes and it still doesnt appear in the
> text box!
Huh? I can't really understand what you're saying.
If you're adding stuff to a database, and getting an error, use
addslashes(), then on the way out of the database, you need to
stripslashes(). Easy.
If you don't get any errors, then magic quotes is probably enabled in your
php.ini file.
Justin
> "Justin French" <justin@indent.com.au> wrote in message
> news:BA295180.1A8D1%justin@indent.com.au...
> don't filter the quotes... escape them with add_slashes()
>
> justin
>
> on 20/12/02 10:50 PM, ªüYam (yam1234@sinaman.com) wrote:
>
>> as title that I'm getting a trouble on filtering the single quote ' ,
> since
>> there would be error when storing those string into MySQL, thus, i have to
>> find the appropriate method to solve it, anybody can help please?
>> thx a lot
>>
>>
>
>