I really wanted this "ini_set()" thing to work, but it still does not. Thankyou for your help though John. If you are curious to see what I am seeing try this out on a windows server where magic_quotes is on... <?php // import variables into 'p_' space import_request_variables('gp', 'p_'); ini_set("magic_quotes_gpc","0"); //ini_set("magic_quotes_sybase","1"); $var = get_magic_quotes_gpc(); print "Magic Quotes = ". $var . "<br>"; if(!isset($p_name)||$p_name==''){$p_name="O'Conner";} ?> <form name=myForm action=test.php method=post> <input type="text" name="name" value="<?php echo $p_name; ?>"> <input type=submit value="submit"> <p> Keep hitting submit </form> -----Original Message----- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 7:46 PM To: Vincent, Jason [BRAM:1334:EXCH] Subject: RE: [PHP-DB] magic_quotes_gpc?
ini_set("magic_quotes_gpc","0") same for magic_quotes_sybase, which is what you really want, I think. You'll probably need it on both the form page and the processing page. If you have a config file that's included on every page, that'd be a good place for it. ---John Holmes... -----Original Message----- From: Jason Vincent [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 3:12 PM To: 1LT John W. Holmes Subject: RE: [PHP-DB] magic_quotes_gpc? AHHH. Now your're talking. It is an IIS server, and Access database (yes - escapes a quote with another quote). Attempting to set the magic_quotes to zero has had no effect - even if I check for it using get_magic_quotes_gpc() and the value is in fact 0, the PHP engine still adds those dang slashes to everything anyway! How do I use ini_set() ? Like this? ... ini_set(php_value magic_quotes_gpc 0); like this? ini_set("php_value magic_quotes_gpc 0"); -----Original Message----- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Thursday, September 19, 2002 3:11 PM To: Vincent, Jason [BRAM:1334:EXCH]; [EMAIL PROTECTED] Subject: Re: [PHP-DB] magic_quotes_gpc? > 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...