homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Changing MD5 passwords

 11:02 am on Mar 24, 2004 (gmt 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)

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)

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?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved