There no need all u have to do is just copy this code and paste it in urs replace the database with yours: $lockout_time = isset($_SESSION['lockout_time']) ? $_SESSION['lockout_time'] : 0; $login_attempts = isset($_SESSION['login_attempts']) ? $_SESSION['login_attempts'] : 0; if (time() - $lockout_time < 30) { echo " You have attempted to log in too many times. Please try again in " . (30 - (time() - $lockout_time)) . " seconds. "; } else { $result = mysqli_query($con, "SELECT * FROM users WHERE Email='$email'"); $row = mysqli_fetch_assoc($result); if ($row && password_verify($password, $row['Password'])) { $_SESSION['valid'] = $row['Email']; $_SESSION['username'] = $row['Username']; $_SESSION['age'] = $row['Age']; $_SESSION['id'] = $row['Id']; header("Location: home.php"); exit; } else {
Please click to subscribe ua-cam.com/users/techareaindia
Thank you for the video and was useful.
Welcome dear. Thanks for your interest with us.
Sir please make a video simple calvulator without page reload in php
"source code please"
Please write to us on techareaindia@gmail.com
There no need all u have to do is just copy this code and paste it in urs replace the database with yours:
$lockout_time = isset($_SESSION['lockout_time']) ? $_SESSION['lockout_time'] : 0;
$login_attempts = isset($_SESSION['login_attempts']) ? $_SESSION['login_attempts'] : 0;
if (time() - $lockout_time < 30) {
echo " You have attempted to log in too many times. Please try again in " . (30 - (time() - $lockout_time)) . " seconds. ";
} else {
$result = mysqli_query($con, "SELECT * FROM users WHERE Email='$email'");
$row = mysqli_fetch_assoc($result);
if ($row && password_verify($password, $row['Password'])) {
$_SESSION['valid'] = $row['Email'];
$_SESSION['username'] = $row['Username'];
$_SESSION['age'] = $row['Age'];
$_SESSION['id'] = $row['Id'];
header("Location: home.php");
exit;
} else {
} else {
$result = mysqli_query($con, "SELECT * FROM users WHERE Email='$email'");
$row = mysqli_fetch_assoc($result);
if ($row && password_verify($password, $row['Password'])) {
$_SESSION['valid'] = $row['Email'];
$_SESSION['username'] = $row['Username'];
$_SESSION['age'] = $row['Age'];
$_SESSION['id'] = $row['Id'];
header("Location: home.php");
exit;
} else {
$login_attempts++;
if ($login_attempts >= 3) {
$_SESSION['lockout_time'] = time();
}
$_SESSION['login_attempts'] = $login_attempts;
echo " Wrong Username or Password ";
echo "Go Back";
}
}
$lockout_time = isset($_SESSION['lockout_time']) ? $_SESSION['lockout_time'] : 0;
$login_attempts = isset($_SESSION['login_attempts']) ? $_SESSION['login_attempts'] : 0;
if (time() - $lockout_time < 30) {
echo " You have attempted to log in too many times. Please try again in " . (30 - (time() - $lockout_time)) . " seconds. ";
} else {
} else {
$login_attempts++;
if ($login_attempts >= 3) {
$_SESSION['lockout_time'] = time();
}
$_SESSION['login_attempts'] = $login_attempts;
echo " Wrong Username or Password ";
echo "Go Back";
}
} else { $login_attempts++; if ($login_attempts >= 3) { $_SESSION['lockout_time'] = time(); } $_SESSION['login_attempts'] = $login_attempts; echo " Wrong Username or Password "; echo "Go Back"; }