Re: How to use Password() in PHP? Syntax problem?
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Mon, 08 Sep 2008 11:20:01 -0400
karlarneg@xxxxxxxxx wrote:
Hello again.
I have tried to use password() in my login-script but it did not work.
My code is:
$sql = "SELECT * FROM users";
$sql .= " WHERE username ='" .
mysql_real_escape_string($_POST['username']) . "' ";
$sql .= " AND pwd = (PASSWORD( ' " . $_POST['pwd'] . " ' )) ";
What is wrong in this?
And how should I write it?
Thanks for all help!
Karl
Karl,
A bigger question is - why are you storing web users in the MySQL user table? That should be only for MySQL users - and your website users should never have MySQL user id's.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: How to use Password() in PHP? Syntax problem?
- From: Jensen Somers
- Re: How to use Password() in PHP? Syntax problem?
- References:
- How to use Password() in PHP? Syntax problem?
- From: karlarneg
- How to use Password() in PHP? Syntax problem?
- Prev by Date: Re: PHP has encountered an access violation...
- Next by Date: Including file Inside class
- Previous by thread: Re: How to use Password() in PHP? Syntax problem?
- Next by thread: Re: How to use Password() in PHP? Syntax problem?
- Index(es):