Atanu Posted December 6, 2006 Share Posted December 6, 2006 Suppose there is a Registration form with having somany fields.So there must be some fields like USERNAME, PASSWORD etc,etc..when u enter the password in the PASSWORD field then the password given by u is being encrypted through the MD5 algorithem or techniqe and it will be stored in the DATABSE.Next after completing the registration when u r going to login then after giving the username and password,a mathch case must be occured.The password given by u is encrypted again and it is being matched with that encrypted password already stored in the database and u will be sucessfully login in ur page.But if I forget my password then how will I retrieve my password which has been already encrypted and has benn stored in the database???How can I get that.What will be the output when I click on the link on the login page:FORGOT UR PASSWORD?please solve this problem. Quote Link to comment Share on other sites More sharing options...
papaface Posted December 6, 2006 Share Posted December 6, 2006 If it is encoded in md5 simply generate a new random password. Quote Link to comment Share on other sites More sharing options...
Atanu Posted December 6, 2006 Author Share Posted December 6, 2006 plz tell the code. Quote Link to comment Share on other sites More sharing options...
papaface Posted December 6, 2006 Share Posted December 6, 2006 Search on google "random string generator + php". When youve found a script you like. I think you just output the random string to the browser (users new password), and get php to send an md5 encoded string to your database. Quote Link to comment Share on other sites More sharing options...
Atanu Posted December 6, 2006 Author Share Posted December 6, 2006 I dont want to generate the password.i want to retrieve the password from an already generated password.so give the exact code Quote Link to comment Share on other sites More sharing options...
papaface Posted December 6, 2006 Share Posted December 6, 2006 You cant decrypt md5. Simple.The way i mentioned is your only option if you are using md5.Also we are here to offer help, not provide you with scripts. Quote Link to comment Share on other sites More sharing options...
Atanu Posted December 6, 2006 Author Share Posted December 6, 2006 ok.but this site "www.phpfreaks.com",there is also on the login page:"Forgot password?".By which way they r able to that.and YAHOO.COM,REDIFFMAIL.COM.all sites r using the same features.When the users are registered on those sites,is it sure that their given password are encrypted generally?If those password be encrypted then how can they retrieve it by clicking "FORGOT PASSWORD?"which format of the password stored in the database?plz help me,i can not get the exact way.plz plz. Quote Link to comment Share on other sites More sharing options...
taith Posted December 6, 2006 Share Posted December 6, 2006 there is no way of decrypting md5 as of yet.if you dont like that answer... i can give you the source code for the md5 encrypt... if you can break it... be my guest. Quote Link to comment Share on other sites More sharing options...
Atanu Posted December 6, 2006 Author Share Posted December 6, 2006 i can't break it.I admit that.but how do others php sites do?what technique do they follow? Quote Link to comment Share on other sites More sharing options...
craygo Posted December 6, 2006 Share Posted December 6, 2006 There passwords are probably store in plain text but when they pass the values they match encryption to encpyption so that the passord is not seen. That would be the only way they could retrieve your password.Ray Quote Link to comment Share on other sites More sharing options...
AbydosGater Posted December 6, 2006 Share Posted December 6, 2006 If you have access to your database just run the following..$newpass = md5("Your New Password");mysql_query("UPDATE my_table SET password='$newpass'") or die(mysql_error));And there you have a new password, as said, there is NO NO NO way to get what you have there back unless you remember it!Abydos Quote Link to comment Share on other sites More sharing options...
Atanu Posted December 6, 2006 Author Share Posted December 6, 2006 many many thanks for the reply.I am happy with the answers but not fully satisfied.ok.thanks again. 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.