Re: Is there any method to filter the single quote from astring?
| From: | Jason Wong | Date: | Sat, 21 Dec 2002 09:02:58 +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-129053@lists.php.net to get a copy of this message | ||
On Saturday 21 December 2002 15:02, Justin French wrote:
> 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.
This seems to be a common misconception (yes, I did it too when I first
started out) -- you don't stripslashes() when retrieving the data. The
slashes that were added with addslashes() are _not_ stored when the data is
inserted.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Most legends have their basis in facts.
-- Kirk, "And The Children Shall Lead", stardate 5029.5
*/