How to set login attempts limit in PHP || Disable after 3 failed login attempts with source code

  Рет қаралды 7,783

Tech Area

Tech Area

Күн бұрын

Пікірлер: 11
@TechAreaIndia
@TechAreaIndia 2 жыл бұрын
Please click to subscribe kzbin.info
@mraziz3230
@mraziz3230 Жыл бұрын
Thank you for the video and was useful.
@TechAreaIndia
@TechAreaIndia Жыл бұрын
Welcome dear. Thanks for your interest with us.
@yogamplanets
@yogamplanets 4 ай бұрын
Sir please make a video simple calvulator without page reload in php
@AvinashChandoli
@AvinashChandoli 2 жыл бұрын
"source code please"
@TechAreaIndia
@TechAreaIndia 2 жыл бұрын
Please write to us on techareaindia@gmail.com
@j1ro963
@j1ro963 8 ай бұрын
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 {
@j1ro963
@j1ro963 8 ай бұрын
} 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"; } }
@j1ro963
@j1ro963 8 ай бұрын
$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 {
@j1ro963
@j1ro963 8 ай бұрын
} else { $login_attempts++; if ($login_attempts >= 3) { $_SESSION['lockout_time'] = time(); } $_SESSION['login_attempts'] = $login_attempts; echo " Wrong Username or Password "; echo "Go Back"; }
@j1ro963
@j1ro963 8 ай бұрын
} else { $login_attempts++; if ($login_attempts >= 3) { $_SESSION['lockout_time'] = time(); } $_SESSION['login_attempts'] = $login_attempts; echo " Wrong Username or Password "; echo "Go Back"; }
Display fetch data from database using PHP MySQLi
7:02
Tech Area
Рет қаралды 7 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
You need to know this trick!
10:49
Vertex Intelligence
Рет қаралды 31
Generate Barcode & save into database in php
10:42
Tech Area
Рет қаралды 9 М.
How to verify email with a verification code - PHP & MySQL
10:35
Adnan Afzal
Рет қаралды 100 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
Signup and Login with PHP and MySQL
43:16
Dave Hollingworth
Рет қаралды 292 М.
Login form with Google reCAPTCHA in PHP
11:21
Tech Area
Рет қаралды 13 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН