Re: How to use Password() in PHP? Syntax problem?
- From: Jensen Somers <jensen@xxxxxxxxxxxxxxx>
- Date: Mon, 08 Sep 2008 18:35:57 +0200
Jerry Stuckle wrote:
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.
Who said he is using the MySQL users table? It's not because his users
table is also called users he is mixing it with the MySQL users table.
--
Jensen Somers <http://jsomers.eu>
Email: -http:// +jensen@
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots. So far, the Universe is winning."
- Rick Cook, The Wizardry Compiled
.
- Follow-Ups:
- Re: How to use Password() in PHP? Syntax problem?
- From: Jerry Stuckle
- Re: How to use Password() in PHP? Syntax problem?
- References:
- How to use Password() in PHP? Syntax problem?
- From: karlarneg
- Re: How to use Password() in PHP? Syntax problem?
- From: Jerry Stuckle
- How to use Password() in PHP? Syntax problem?
- Prev by Date: Including file Inside class
- Next by Date: Re: How to use Password() in PHP? Syntax problem?
- 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):
Relevant Pages
|