When you store the information into the field you can us the mysql function
password. Then when you wish to test for a match you do something like
select count(*) where username='$username' and passwd = Password($password)
Where $username is the input username and $password is the input username
What is stored in the database is the std mySQL encoded password.
> On Tue, Feb 04, 2003 at 02:58:28PM -0500, Jianping Zhu wrote:
>>
>> I have mysql in a redhat machine. I need to use mysql do user
>> authentication to a website.
>> I have a table like following.
>>
>> +----------+----------+
>> | username | passwd |
>> +----------+----------+
>> | jianping | jian1830 |
>> | chichi | jian1830 |
>> +----------+----------+
>>
>> I want the passwd field not to be plain text but encrypted. how can i
>> do that?
>>
> Not for sure on the exact syntax becuse I've always used myPhpAdmin's
> md5 utility but it would be something like
>
> MD5("jian1830")
>
> this would do an MD5 hash
> --
> Jerry M. Howell II
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]> To
> unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
William R. Mussatto, Senior Systems Engineer
Ph. 909-920-9154 ext. 27
FAX. 909-608-7061
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php