View Single Post
Old 05-23-07, 06:07 PM   #15
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: Need a non-functional PHP login box

Quote:
Originally Posted by evilghost
What's the password() method? crypt()? I like MD5 because it's a one-way hash and to test for successful login all you have to do is:

if(md5($user_supplied_password) == $md5_value_from_db)
//auth_ok
else
//auth_failed
the password() function is a hash function as well. it's inside MySQL i believe.

EDIT:
http://dev.mysql.com/doc/refman/5.0/en/user-names.html

actually, it appears to be its own encryption function in MySQL. i found a way to call the function outside of MySQL. i assume i just use that function instead of the md5() call?
http://us.php.net/mysql
ViN86 is offline   Reply With Quote