Re: Filtering out \ when a ' is user entered?
| From: | Richard Lynch | Date: | Fri, 29 Jun 2001 15:49:39 +0000 |
| Subject: | Re: Filtering out \ when a ' is user entered? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55569@lists.php.net to get a copy of this message | ||
>> I had the same problem:
>>
>> So I tried stripslashes..
>> But Queries do break if unslashed ' or " are present.
>> and furthermore, there are many other problems ..
>>
>> So I created a function called "entities"..
>
>Why don't you simply use addslashes () again when you put the stuff into
>the DB?
Better yet, only use stripslashes() to display to the user.
If your code is well-organized, you need stripslashes() in only a couple
places, and that's it...
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm