Código PHP:
    
function filtro($input){
$referer = htmlspecialchars($_SERVER['HTTP_REFERER']);
$filtro = array("`", "´", '"', "<", ">", ";", "'", "%60", "%C2%B4", "%22", "%3E", "%3C","%27", "%25", "%");
for ($i=0; $i < count($filtro) ; $i++) {
 if(eregi($filtro[$i],$input)) {
echo "<center>Error.<br /><br />
<a href=\"$referer\">Buelva a intentarlo por favor</a>.</center>\n";
  exit(1);
 }
}
return mysql_escape_string(htmlspecialchars($input, ENT_QUOTES));
}
 
 
http://foro.elhacker.net/php/update_mysql_en_php-t191147.0.html#ixzz1ELTMhxqU 
    
 


