July 20th, 2000, 04:23 AM
I just heard of PHP a week ago, so bear with me.
I want to compare $PHP_AUTH_PW to a crypted password in a MySQL database. I know this isn't right, but this is what I'm working with right now -
$sql = "SELECT * FROM individual_info WHERE username='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
I think the problem is I need to get the $PHP_AUTH_PW crypted the same way MySQL crypted the one in the database, but I don't know how. Thanks for your patience.
July 24th, 2000, 07:34 PM
How was the password in the database crypted in the first place?
If it is part of the mySQL access table and was generated with a GRANT statement, try using the PASSWORD function.
select * from TABLE where pass=password($PASS_VAR)