Re: Inserting single quotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!

Skip


A 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux