so there you are, coding your scripts, when you noticed your HTML output contains slashes.

the slashes are the back slashes like this one: \

often these slashes are used to escape characters in PHP, but why is godaddy shared web hosting servers adding this..

the answer is simple, magic_quotes_gpc, for security reasons. so what can you do to avoid it?

simple, i created this simple code you can use at the beginning of your script to avoid the $_POST data from godaddy server putting slashes.

// on godaddy G4 hostin, it puts a slash.. for example: i submit: jesus' it comes out: jesus\'
//http://forums.phpfreaks.com/topic/117564-test-for-magic-quotes-gpc/
if(function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()){
$func = create_function('&$value','$value = stripslashes($value);');
array_walk_recursive($_GET,$func);
array_walk_recursive($_POST,$func);
array_walk_recursive($_COOKIE,$func);
}