Hello, here's a function you can use before saving to database that will remove everything in the exploit array.
Example
$sql = "insert into table (username) values ('".wrap_values($username)."')";
function wrap_values($str)
{
$str = trim($str);
$temp_str = stripslashes($str);
$exploits = array("dork", "shoot", "<", "script", ">", "&", "%", "!", ";");
$temp_str = str_replace($exploits, "", $temp_str);
return $temp_str;
}