PDA

View Full Version : md5


am_sarath
08-29-2002, 05:26 PM
hello,

I've an index page where the admininstrator can enter his user name and password.After the admin is logged in successfully, the admin would like to change his password.
first, i would like to type the old password and new password, re-enter the new password.

If the old password is the same as that of the exsisting one in the table and if the new-password and the re-entered password are same, then the table should be updated with the new password, of course in the encrypted form.

There would be only one user(admin) in the table.The password is encrypted.I did using md5.

do somebody have any idea how we can change the password.

Thanks in advance.



Thanks in advance!

Grizzly
08-29-2002, 05:46 PM
I'm not sure if I understand what you're asking from us. It sounds like you have the general flow/process down in your mind, so what advice are you looking to get from us?

Simply md5() the "old password" field supplied by the user, and compare it against the currently encrypted password in the database. If they match, then you can md5() the "new password" supplied by the user, and update the table with the new encrypted password.