|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. ie. select * from TABLE where pass=password($PASS_VAR) HTH Marty |
![]() |
| Viewing: Dev Shed Forums > System Administration > Security and Cryptography > Compare PHP generated crypts to MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|