a quick clean() function to stop $_Post and $_Get attacksPHP Code:function clean($str)
{
$cleaned = strip_tags(htmlspecialchars(addslashes(stripslashes(htmlentities(mysql_real_escape_string(fix_magic_quotes( $str )))))));
return $cleaned;
}
Edit: Now removed fix_magic_quotes as its not needed that im aware of.
any more security needed tbh?PHP Code:function clean($str)
{
$cleaned = strip_tags(htmlspecialchars(addslashes(stripslashes(htmlentities(mysql_real_escape_string( $str ))))));
return $cleaned;
}







Reply With Quote
