I am trying to use encode/decode to store passwords in a database and then
retrieve it to email to a user who has forgotten their password.
I am using the following code to encode the password:
INSERT INTO users (name, password) VALUES ('$_POST[username]',
'ENCODE($_POST[password], encrypt)')
This does enter a binary entry into the database, presumably the encoded data.
I then tried to retrieve the password using the following:
SELECT username, DECODE(password, 'encrypt') as password from users
but all I got was gobbledygook characters.
What am I doing wrong?
Thanks,
-Lisi
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php