Okay, so in response to your PM about having issues, I went ahead and fiddled for about 20 minutes. I came up with the following:
Image Verification & Password Changer
Now, you can look at the source (the .phps file) and see it in action (the .php file). It works. The default password is "pass123" without the quotes. Try it out. IT works.
And the code is fairly straight forward. I've taken my tutorial, and just added to the form, put in some more error handeling, and added the checks. You can see all the code for yourself. But it mainly works this way:
-- User inputs data (old password, new password, verify password, image verification code)
-- Script sees that info is Posted
---- Script checks to see if verification code is correct
------ If not, it sets an error code
---- Script checks to see if old password is correct
------ If not, it sets an error code
---- Script checks to see if a new password is there
------ If not, it sets an error code
---- Script checks to see if a verify password is there
------ If not, it sets an error code
---- Script checks to see if either a new password, or verify password is set
------ If not it checks the compatability
-------- If passwords not the same, it sets an error code
---- Script checks to see if error flag is set
------ If it isn't set, it lets the user know they successfully changed it
------ If it is set, it shows the errors on the form.
Take a look, copy if you want, but I think you're smart enough to figure this out by reading just a little bit more ... and comparing what you have against what I have.