Temporary form controls de-activation using PHP
Posted: Sun Jul 26, 2009 8:42 am
Hi folks.
I am kind of a newbie on PHP coding and I am not yeat an expert on the way PHP always needs a submit in order to run code.
That's why I am having a problem trying to implement my customer's requirement.
He wants the login form to get temporarily deactivated after 5 unsuccessful attempts to log in (kind of "take 30 seconds to remember your password") and then get activated again and so on.
I've tried to use the sleep function after displaying the 5th "password incorrect" error but I can't find the way to submit the form automatically once the waiting time has passed.
I also tried using Javascript, but as it cannot change the value of Session variables, I couldn't find the way either.
I would really appreciate it if someone knows the solution. It would be quite useful to know how to send a submit order in a syncronous way for other uses.
Cheers in advance.
m.
I am kind of a newbie on PHP coding and I am not yeat an expert on the way PHP always needs a submit in order to run code.
That's why I am having a problem trying to implement my customer's requirement.
He wants the login form to get temporarily deactivated after 5 unsuccessful attempts to log in (kind of "take 30 seconds to remember your password") and then get activated again and so on.
I've tried to use the sleep function after displaying the 5th "password incorrect" error but I can't find the way to submit the form automatically once the waiting time has passed.
I also tried using Javascript, but as it cannot change the value of Session variables, I couldn't find the way either.
I would really appreciate it if someone knows the solution. It would be quite useful to know how to send a submit order in a syncronous way for other uses.
Cheers in advance.
m.