General discussion

Locked

PHP and MySQL password change form with MD5

By cphillips ·
Hi,

Summary:
I am a beginner to PHP and MySQL. I have recently built my first user authentication web interface using PHP sessions, MySQL, and MD5. I can get the users to register, and then log in with a randomly generated password.

Problem:
My problem is no matter how hard I try I cannot get the change password form to work. I can get the variable to store the hash, but it wont "update" the MySQL database with the new hash.

Begging for help:
Could someone help me out and explain how to accomlish this? Ultimately I would like to be able (as the admin) to change a password to a temporary password for the user, and then the user can log on with the temporary password and change the temporary password to a new password.

Thank you for your time!

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

I would

by Jaqui In reply to PHP and MySQL password ch ...

use the password field ability in mysql.
pass and update text, into a table field designated as type password, mysql with encrypt it automatically.

the problem with using your own has, is that it doesn't always match the hashed password in the db, so it will get rejected.

mysql works by comparing a hashed entry to the has in the database for password fields, so if there is any discrepancy, then it will deny the alteration.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums