Jump to content

javascript count number times login is wrong


tbobker

Recommended Posts

I'm not sure I follow what your doing... whats w/ the loops? Maybe post a bit of code.

I use php session to track failed loggins...

[code]<?php 
session_start();

if($_POST['submit']){
//check for valid log in.
//if it works, log them in,
//if it fails...
$_SESSION['logInAttempts'] = ++; //add 1 to the current value.
if($_SESSION['logInAttempts'] > 3){
header("Location: youLose_nowGoAway.php");
exit();
}
}
?>
Then, in your form, when it reloads

failed Login. You have attempted to log in <?php echo $_SESSION['logInAttempts'] ?> time(s)
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.