MD5 login troubles

From: Date: Mon, 17 Feb 2003 16:16:10 +0000
Subject: MD5 login troubles
Groups: php.general 
Request: Send a blank email to php-general+get-135849@lists.php.net to get a copy of this message
Hey all, I'm using the following code to save an MD5 password into a database along with an unencrypted username and email address: $insertSQL = sprintf("INSERT INTO penpals (email, password, username) VALUES (%s, MD5(%s), %s)", All seems to have worked well, the password is encrypted and so forth. I have also attempted to use the following MySQL command to encrypt the password and came up with the same result: UPDATE penpals SET password = MD5(password) WHERE ID = 1 So the trouble seems to be with the login where I am using the following code: SELECT email, password, access FROM penpals WHERE email= '%s' AND password = MD5('%s') Am I missing something here? Am I some how double encrypting the password? Is there a de-encrypt function or something I'm missing? Thanks

« previous php.general (#135849) next »