what about this?
prepends backslashes to the following characters: \x00, \n, \r, \, ', " and \x1a.
if(get_magic_quotes_gpc())
$input= stripslashes($input);
$input=str_replace('%','',$input); (or $input=ereg_replace('%','',$input)😉
$input=mysql_real_escape_string($input);
is stripslashes() needed for both GET or POST data?