patelp7 Posted April 23, 2007 Share Posted April 23, 2007 Hello. I encryt a password and put it in a table. How would i retrieve the password in a decrypted format? $Encryptedpassword = crypt($Password, "ND"); $query = "insert into adminmember (Username, Password, First_Name, Last_Name, EmailAdd , User_Level) Values ('$Username', '$Encryptedpassword', '$Firstname', '$Lastname', '$Emailadd', '$Userlevel')"; Thats how mi encrypt it when inserting....any ideas on retrieving? Cheers Link to comment https://forums.phpfreaks.com/topic/48240-decrypt-password/ Share on other sites More sharing options...
Mr. R Posted April 23, 2007 Share Posted April 23, 2007 When you validate someones login you just encrpt the password that they type in, im not sure, but i dont think you can get it back to display it. Link to comment https://forums.phpfreaks.com/topic/48240-decrypt-password/#findComment-235806 Share on other sites More sharing options...
patelp7 Posted April 23, 2007 Author Share Posted April 23, 2007 its for a edit screen....so if they were to edit their password, as it is encrypted the wrong character values will be inserted. You know what i mean Govner Link to comment https://forums.phpfreaks.com/topic/48240-decrypt-password/#findComment-235810 Share on other sites More sharing options...
Mr. R Posted April 23, 2007 Share Posted April 23, 2007 Hmmm.. im not very good at PHP so im not really sure... If i were to do this id just fetch the password from the database, even if its something like "dfkjb45kjbfokjn45t08hi" Then to login, compare the password they type in with this one. You have to encrypt the password they type in aswell in order for the validation to work, else you would be validating thier password that could be "apple" to an encrypted apple lol, which could be sopmething like tha above. Even if their changing the password you dont need to know what it was in the first place. Link to comment https://forums.phpfreaks.com/topic/48240-decrypt-password/#findComment-235815 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.