Re: DB quoteSmart + mysql + magic quotes
| From: | Justin Patrin | Date: | Sat, 07 Jan 2006 00:20:39 +0000 |
| Subject: | Re: DB quoteSmart + mysql + magic quotes | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22466@lists.php.net to get a copy of this message | ||
On 1/6/06, Mark Steudel <mark@netriver.net> wrote:
> If I am using db->quoteSmart( $val ) do I need to first strip slashes on it
> before passing it into quoteSmart or does quoteSmart already strip out
> slashes before running it's quote routine on it?
>
Use HTML_QuickForm, which will strip slashes if you have magic quotes on.
And turn off magic quotes whenever you can. It's not useful.
http://pear.reversefold.com/dokuwiki/doku.php?id=phpfaqs#why_is_magic_quotes_gpc_bad
--
Justin Patrin