Not sure if it’s possible but we have 2 servers set up, one automatically escapes values passed via GET and the other doesn’t.
We’re not sure if this is ‘magic quotes’ or anything, but we need to have the second server escape the values too, otherwise we’ll have to rewrite a lot of code.
Thanks for any help.
Yup it’s magic quotes that you are looking for, but beware:
WHAT IS MAGIC QUOTES?
Magic Quotes is the process which escape the incoming data to the PHP script like $_POST, $_GET. But it is recommeded to code with he magic quotes off.
When magic quotes is enabled then it will escape single quote(‘), Double Quote(“), backslash() and NULL by placing backslash in front of these characters. This is same as performing addslashes() on any string.
So whenever your user post the form with value like avinash’s name then you will get avinash\’s name in $_POST value.
The PHP manual itself has a warning about using magic quotes
DISABLE MAGIC QUOTES
There ae several ways to disable the Magic Quotes.
1) Disable using PHP.ini
You can set below setting from php.ini file.
2) Disable using .htaccess
Place below code in your .htaccess file if you don’t have access to php.ini file.
So a word of advice do NOT use them.