Hi everybody -
I'm developing a database driven website on Unix using PHP and MYSQL.
Users are required to register and are then allocated a username and password. In order to purchase items from the site, users are required to login using username and password.
I want each user to be able to attempt login no more than 3 times - on the third attempt, if the username is wrong, the account is locked out.
Any ideas on the best way to do this - i.e. keep track of the number of attempts? I thought of adding a LOGIN_ATTEMPT_NO to the USER table and incrementing it each time a login is attempted. But no sure is this is the best way.
Was also thinking about using php session vars but presume these get reset at end of session, so if user restarts computer or exits and reenters site, vars will be reset. I want them to remain locked out until they contact system admin to reset the account
All advice appreciated
Thanks very much
LS
I'm developing a database driven website on Unix using PHP and MYSQL.
Users are required to register and are then allocated a username and password. In order to purchase items from the site, users are required to login using username and password.
I want each user to be able to attempt login no more than 3 times - on the third attempt, if the username is wrong, the account is locked out.
Any ideas on the best way to do this - i.e. keep track of the number of attempts? I thought of adding a LOGIN_ATTEMPT_NO to the USER table and incrementing it each time a login is attempted. But no sure is this is the best way.
Was also thinking about using php session vars but presume these get reset at end of session, so if user restarts computer or exits and reenters site, vars will be reset. I want them to remain locked out until they contact system admin to reset the account
All advice appreciated
Thanks very much
LS
