Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Changing MD5 passwords

11:02 am on Mar 24, 2004 (gmt 0)

New User

10+ Year Member

joined:Mar 19, 2004
votes: 0

Hi all,

I have a membeship site that automatically issued users with MD5 encrypted passwords. Users can request a new password but they can't set their own.

Any ideas on the best way to let a user enter a plain text password into a form and have ir stored in MySQL with MD5 enctiption?


11:09 am on Mar 24, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Dec 13, 2002
votes: 0

The form could store the user-password string in a variable, which you could then encode using the MD5 function [php.net] before altering it in the database, and then compare them as you already must do when users login. Or am I missing something obvious? :\

[expanded the idea]

11:27 am on Mar 24, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 10, 2004
votes: 0

That shouldn't be a problem.

Just make sure that the person changing the password is actually the user who owns the account!

Can be done in 2 ways in my opinion:

1. User also enters old password for verification.
2. User also enters some verification-code he got sent via email.

note that point 2 you can also accomplish by using the ability to give them a auto-generated password (wich you allready have). Users can then use point 1 using that generated password to effectively get point 2 :).

get the idea?


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members