Basically, it breaks down like this...
*You pass the following information, via POST to the processing script
- Login Name
- Old Password
- New Password
- New Password (confirmed)
*in the processing script you do the following:
- get the variables with $POST[] Example: $login=$POST['login'];
- test to make sure the new password matches the confirmed password,
if not, kick them back with the appropriate error message. I like using a meta
refresh to do this. Example:
<meta http-equiv="refresh" content=0;url="returnurl.html">
- make a database connection and select the database
- pull the user information with a select statement
- compare database password to passed old password. If they don't match,
kick them out.
- if they match, do an update of the password with the new password.
- Close your database connection and refresh to a "Password Changed" page.
That's your methodology. Now, go get em!