Hi,
(Php & MySQL) I'm trying to figure out how come this function does not work correctly. It's add extra \ everytime I edit my entries.
Online server have these settings: magic_quotes_gpc On magic_quotes_runtime Off magic_quotes_sybase Off
function esc($s)
{
if (get_magic_quotes_gpc()) {
if (ini_get('magic_quotes_sybase'))
$s = str_replace("''", "'", $s);
else
$s = stripslashes($s);
} //if
return mysql_real_escape_string($s);
}
Edit note: I have completely removed this function to see what it does...and it does the same thing so I have realized that addslashes is also use in the code for the same thing.
The extra \ where there because magic_quote was ON
Thanks