Re: magic_quotes_gpc?
| From: | 1LT John W. Holmes | Date: | Thu, 19 Sep 2002 19:10:40 +0000 |
| Subject: | Re: magic_quotes_gpc? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21857@lists.php.net to get a copy of this message | ||
> New PHP (long time PERL user) here. I am using an Access database -
> yeah I know Access is crap, but I have no choice. Anyway, it seems that
> this magic backslash thing is unavoidable. As I understand it, I can shut
> it off at the .ini level, but I am running this app on a hosted server
with
> other apps - I haven't the choice to make that change. The question is
> this...
>
> Can I override the magic_quotes_gpc setting at the script level? (i.e. on
> the fly, for this script only?) If not, I am guessing I need to remove
the
> single quotes on the client side (javascript) prior to submitting the
data?
> (any other ideas on how to handle this without changing the .ini?)
You can use ini_set() in all of your scripts (or include file), or .htaccess
depending on your server.
php_value magic_quotes_gpc 0
Does Access escape it's quotes with an additional ' instead of an \ ? If so,
then you should look at magic_quotes_sybase. Turning it on will escape
strings with a ' instead of an \. It also can be set in .htaccess or
ini_set().
---John Holmes...