My sites authentication system was recently bypassed. Will this code stop sql injects on my login page?
$username = $_POST[username];
$password = $_POST[password];
$username_fixed1 = str_replace("'","", $username);
$username_fixed2 = str_replace(")","", $username_fixed1);
$username_fixed3 = str_replace("(","", $username_fixed2);
$username_fixed4 = str_replace("IS NULL; --","", $username_fixed3);
$username_fixed5 = str_replace("--","", $username_fixed4);
$pass = MD5($password);
$sql = mysql_query("SELECT * FROM user WHERE username='$username_fixed5' AND password='$pass' AND activated='1'");
Will this stop the bad guys from hacking into my site via my login form?