Note Submitter: sorin dot roiban at usphp dot com
Reason: in docs
----
When checking credentials against a database where you keep
passwords hashed it is more secure to create a query with
the password hash instead of the actual password. One reason
is that we don't want the password to show up in clear in
the database query log.
Use:
$hash = md5($password);
$query = "SELECT * FROM `Users` WHERE `UserId` = '$id'
AND `PasswordHash` = '$hash'";
...
Do not use:
$query = "SELECT * FROM `Users` WHERE `UserId` = '$id'
AND `PasswordHash` = MD5('$password')";
...
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|