if(isset($_POST['submit'])){
$username = escape_string($_POST['username']);
$password = escape_string($_POST['password']);
$query = query("SELECT 'username', 'upassword' FROM userregistration WHERE username = '{$username}' AND upassword = '{$password }' ");
confirm($query);
if(mysqli_num_rows($query) == 0) {
set_message("Your Password or Username are wrong");
redirect("login1.php");
} else {
$_SESSION['username'] = $username;
redirect("index.php");
}
}
This is my Log In Condition in my Log In form. This is working. but im confused how to add some conditions that redirects the user to other form after attempting to login 3 times.