I will create a Simple Login System and i need to remember the last 5 incorrect login in mysql, but how to create a update loop for 5 login? Ex: login incorrect 1:
$connection = mysqli_connect($host, $username, $password, $database) or die("Unable to connect to the MySQL Server!");
$sql_query = "INSERT INTO login(date,user,ip) VALUES('$today','$_POST['user']','$ip')"
Same code for login2, 3,4,5 but after 5 login how to update the first incorrect login? And for 6° incorrect login how to update the 2° incorrect login?
$sql_query = 'UPDATE login SET date="' . $date . etc etc; But
but how do I know the older incorrect login to update it?