Simple code for the two password crypt() for the sha1()

Asked By 0 points N/A Posted on -

I would like to sort to passwords using DB. I used sha1 for the two salts I’ve been using. The first salt is for the user and the other one is for public users.

Both salts are stored in PHP code. PHP suggests the use of crypt() for sha1() but I prefer more simple codes for the two passwords.

Could you help me with that?  

Answered By 0 points N/A #109111

Simple code for the two password crypt() for the sha1()


If you want to sort out the passwords in only database then simply run the query that I am going to tell you below.


FROM TableName

Order By PasswordAttributeName

When you enter this code in SQL or in the PHP forum, it automatically sorts your password. However if you want that this code should execute after a certain password entry is made or any other programming then you should copy this code and paste it below that code after the new password entry is saved.

This is how you can do the sorting on an entry level without using the sha1() or any other scripting functions that might have caused some sort of problem.

If you still can’t solve it, then make a function of it and pass the values as parameters.

Login/Register to Answer

Related Questions