|
Posted by Michael Fesser on 01/10/08 12:16
..oO(Karl)
>On 10 Jan, 12:32, Michael Fesser <neti...@gmx.de> wrote:
>> .oO(Karl)
>>
>>
>> >Is it because of the way I query the database?
>>
>> We don't know how you query the database since you didn't post any
>> query. But if you use PASSWORD() to store the passwords, then of course
>> you also have to call PASSWORD() when you compare the user-submitted PW
>> with the stored one.
>
>Yes, i think that. But how do I build a query that call PASSWORD()?
SELECT ...
FROM yourAuthTable
WHERE username = '$username'
AND password = PASSWORD('$password')
where $username and $password contain the validated and sanitized values
(see mysql_real_escape_string()) from the form on your HTML page.
Micha
Navigation:
[Reply to this message]
|