You are here: Re: Problems when using PASSWORD( $pass) in PHP/MySql « PHP Programming Language « IT news, forums, messages
Re: Problems when using PASSWORD( $pass) in PHP/MySql

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация