This tutorial teaches you how to build a secure forgot password system or a complete login system with the forgot password feature without refreshing your website page using Ajax, Jquery and PHP.
This system is secure in the sense that, the users of your website have been given the privilege to set their private security questions and answers during their account creation process that they will later use, should they forget or lost their account passwords.
If a user of your website happens to lost or forget his account password, that user does not need to request for a new random generated password sent via his or her email box which is not secure because an attacker can intercept such messages and therefore gain access to the account of your user(s).
What this system does is to allow your users to set their private or secret questions and answers during their account creation so that, if a user forgets his or her password, all the user will do is to come to the login page of your website and click on the forgot password button, the system will then prompt the user to enter his or her account username.
After the user has provided his or her account username and clicks on the submit button, the system will now validate the submitted username to be sure that its valid and gets the secret question associated with the submitted username from the database for the user to answer it.
If the user answers the secret question correctly, access to change the password that is associated with the submitted username account will be given to this user otherwise this user will be denied access.
Users are given 6 chances to enter correct answer for their security questions during their reset password process after which the system will lock a user out for 30 minutes, should the user submit wrong security answer up to six times.
The system supports all browsers and the scripts are written in a way that any one can easily understand and customize with good programming code comments to ease usability.
To install the system on your server after you must have downloaded the zipped folder containing the required files, extract it to your system then, open the file named README.txt and follow the three steps instructions given in that file.
To see the system in action, please click on the Live Demo button below and download if you like what you see.