|
|
|
PHP Change Password script using mysql |
Change password feature is a common requirement for any membership management script. Here members can change their password after logging in to the member area. Here we will check the session of the member to allow or disallow the access the change password page of the site. Here we can ask the member to enter the old password once and then enter new password twice. Since the member has already used his or her old password to login so there is no point in asking the same again for verification. You can include this step also if required but here we will skip the step involving entering the old password.
We know the user-id if the member as he has logged in so we will not ask the member to enter userid again. It is not a good practice to allow the member change his or her userid.
The new password will be effective from the next login of the member.
We will ask the member to enter the new password twice. Both the entered password should match and must pass the validation. If all the checks passed well then we will update the record of the member with new password.
Let us start with the form. You can download the code at the end of this tutorial but here is the form for change password.
| |
| Subscribe |
|
Submit your email address and receive
article and product notifications. Your email is safe with us.
|
|
|
|
|
|