Re: Inserting single quotes
| From: | Jim Lucas | Date: | Sat, 07 Jul 2007 08:16:46 +0000 |
| Subject: | Re: Inserting single quotes | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258447@lists.php.net to get a copy of this message | ||
skip evans wrote:
Yes, it turns out the production server did not have a php.ini file!!! I copied the php.ini-recommended file into place, and it has magic_quotes_gpc off and that did the trick. Thanks much! SkipA good thing to use though, is code that will detect if it is turned on. Something like this if ( get_magic_quotes_gpc() ) { $_GET = array_map("stripslashes", $_GET); $_POST = array_map("stripslashes", $_POST); $_REQUEST = array_map("stripslashes", $_REQUEST); } This way, it doesn't matter what the setting is, it will be corrected if it is turned on, no matter what. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare