This topic is locked

MD5 encryption

8/6/2007 2:50:13 PM
PHPRunner General questions
D
darkstorm author

Hi,

I have the following situation.

I have created a table with user details like username ,password ,email ,id and level.
I have selected to encrypt the passwords in the database.

The first issue was that when i tryed to manually add a record the password field would not get encrypted, so i manually edited the code and i added $evalues=md5($value); .

So i solved the issue with the encrypted password when i want to add records...

Now the issue is when i try to edit the record.

I did the same for the edit page with the md5 like the above.

The post_value variable is allready encrypted .. so when i try to update the record... and i leave the password field unchanged the value wich is a md5 hash will get encrypted again....
Any workaround for this issue??
Thanks

Sergey Kornilov admin 8/6/2007

You have two options here:

  1. remove the password field from the Edit page
  2. clear this field on page load to make user enter it every time