mesh2005 Posted June 25, 2007 Share Posted June 25, 2007 I have a form where people register and their info (including username and password) is saved in the database. Some of my friends told me to save the hash of the password not the password itself to protect against any hack trial if the hacker got access to the database. Is that effective? If the hacker got access to the database, he cam simply generate the hash of a new password and save it in the database, right? And, using the hash makes it not easy to recover the password! How can I give the users the ability to recover passwords? Quote Link to comment Share on other sites More sharing options...
chocopi Posted June 25, 2007 Share Posted June 25, 2007 use md5() Hope it helps ~ Chocopi Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 25, 2007 Share Posted June 25, 2007 use md5($password); you can not unecript md5 so ur need the user to update there lost password but quering the date base with example a random number they got when they registred to your web site. in this case the user would press a link call lost password or forgot password this would take them to a form askig thrm for a random number the number gave to them from registration, afther they fill in the random number you then have another form for them to enter there new email address at the same time you overwrite update the database with a new random number and there new email address ok. same with passwords emails ect ect same concept ok. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.