June 21st, 2000, 09:51 AM
I am setting up a web based administrator for my MySQL database. It is mostly complete minus one detail. I cannot find an effective way to verify a MySQL user password for access verification.
The script connects to the mysql database with the root as user and password, I need it to then check the username and password in the user table against the username and password provided by the user for login. I can retrieve the username fine with a query, but the encrypted password is seeming to be a problem.
Any ideas would be appreciated.......
June 26th, 2000, 11:21 AM
June 26th, 2000, 01:53 PM
how did you solve the problem?
June 29th, 2000, 10:40 AM
Encrypted the password provided by the user and then compared against the encypted string extracted from the user table in MySQL. Simple, yet effective.
how can i encrypt the password when id dont know the encryption mechanism ?
Run a MySql query to encrypt the password in MySql format............ie:
#encrypt input password
$sth = $dbh->prepare( "SELECT PASSWORD('$yourinput')" );
if ( !defined $sth )
####$encrypted will now contain your password to compare against the MySql password entry...
I am new to pearl. Any idea how it can be done in php.