note 22075 deleted from function.md5 by jimw

From: Date: Sat, 08 Feb 2003 19:49:09 +0000
Subject: note 22075 deleted from function.md5 by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-43637@lists.php.net to get a copy of this message
It should also be pointed out that PHP contains no functions for decrypting a hashed string. If you want to use md5() to encrypt users' passwords in a database, you would go about coding the login by encrypting the submitted password ie. $user_submitted_password = md5($user_submitted_password); $result = mysql_query("SELECT * FROM users WHERE encrypted_password='$user_submitted_password'"); if (mysql_num_rows($result) < 1) { echo "Invalid password"; exit; } else { echo "Correct password!"; }

« previous php.notes (#43637) next »