Checking for valid login
| From: | lars-eirik at netcom dot no | Date: | Thu, 02 Aug 2001 10:00:41 +0000 |
| Subject: | Checking for valid login | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-8624@lists.php.net to get a copy of this message | ||
Hi there. I have a problem with PHP and mysql.
I have users stored with a username and a password in my mysql db
when i try to do a check for a valid u/p match i always get an error.
I have password stored in the db using the mysql password()function.
When i want to test for an entered password in an HTML form it does not
allow me to do a check.
This is my code.
$check="select * from userinfo where username='$testusername' and
password=password($'testpassword')";
Is it not possible to do a test on the html password in the query.
If that is the case how can i retrieve the password stored in the db
decrypted to check if it is the same as entered in the HTML form.
I appreciate any help
Lars Eirik Rønning