cluce Posted May 14, 2007 Share Posted May 14, 2007 I am trying to count the number of unsuccessful logins. Can someone tell me would be the syntax to increment this in a table? How could I add to the current value? Or would do an INSERT? can someone give me some direction? here is my code //redirect back to login form if not authorized $_SESSION['error'] = "<font color='red'>invalid username and/or password combination</font>"; $sql3 = "UPDATE auth_users SET failed_logins = WHERE username = '".$_POST["username"]."'"; header("Location: user_logon.php"); exit; } Link to comment https://forums.phpfreaks.com/topic/51323-solved-i-am-trying-to-count-the-number-of-unsuccessful-logins-and-store-in-table/ Share on other sites More sharing options...
Dragen Posted May 14, 2007 Share Posted May 14, 2007 I believe it would be: //redirect back to login form if not authorized $_SESSION['error'] = "<font color='red'>invalid username and/or password combination</font>"; $sql3 = "UPDATE auth_users SET failed_logins = failed_logins + 1 WHERE username = '".$_POST["username"]."'"; header("Location: user_logon.php"); exit; } Link to comment https://forums.phpfreaks.com/topic/51323-solved-i-am-trying-to-count-the-number-of-unsuccessful-logins-and-store-in-table/#findComment-252755 Share on other sites More sharing options...
cluce Posted May 14, 2007 Author Share Posted May 14, 2007 thats what I thought that was simple enough....thanks Link to comment https://forums.phpfreaks.com/topic/51323-solved-i-am-trying-to-count-the-number-of-unsuccessful-logins-and-store-in-table/#findComment-252778 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.