Hi,
I have a working Insallation of this howto:
http://www.howtoforge.com/virtual_po...er_ubuntu_edgy
Well, I want to provide to the users a simple Webinterface to change their passwords. So I began to wrote a PHP-Script. To verify the logins I first execute this Statement:
Code:
SELECT * FROM users WHERE (email='$email') AND (password=ENCRYPT('$pass'))
The login always fails and I know why: Here a quote from the MySQL manual
Quote:
ENCRYPT(str[,salt])
Encrypts str using the Unix crypt() system call and returns a binary string. The salt argument should be a string with two characters. If no salt argument is given, a random value is used.
|
When I execute the following statement several times, then I get each time another value
Code:
SELECT ENCRYPT( 'mysecretpassword' );
Now the question: What is the right "salt" Value to get always the same output as the system crypt() function?
thanks for help & greets
Roman
Recent comments
7 hours 25 min ago
16 hours 53 min ago
17 hours 42 min ago
21 hours 16 min ago
1 day 1 hour ago
1 day 2 hours ago
1 day 4 hours ago
1 day 14 hours ago
1 day 19 hours ago
1 day 20 hours ago