Re: Escape problems...why?
| From: | John W. Holmes | Date: | Fri, 23 Apr 2004 03:55:34 +0000 |
| Subject: | Re: Escape problems...why? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184343@lists.php.net to get a copy of this message | ||
Ryan A wrote:
For example this insert statement: insert into test_ing values('a','a','a','a') becomes: insert into test_ing values (\'a\',\'a\',\'a\',\'a\') I immediatly suspected "magic_quotes" but checked (via phpinfo) and see that magic_quotes are off, as a safety precaution I even have "set_magic_quotes_runtime(0)" in the "config.php" file... I did see that "magic_quotes_gpc" is on, and then went to the PHP online manual and it says this cant be fixed during runtime...? is this the problem? if so how to fix it?_runtime() applies to data coming _out_ of a database within your script. Answer is go turn magic_quotes_gpc OFF or use stripslashes() on the data. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com