the easiest way to do this is to use mysql's own 'password' function. to add a new user use:
insert into table (username,passwd) values ('jianping',password('jian1830')) to validate the password: select count(*) from table where username='jianping' and passwd=password('whatwasentered'); or similar... On Tue, 4 Feb 2003 14:58:28 -0500 (EST) Jianping Zhu <[EMAIL PROTECTED]> 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? > > Thanks. > > > > --------------------------------------------------------------------- > 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 > > -- -------------------------------------------------------------------- [EMAIL PROTECTED] Collaborative Intrusion Detection join http://www.dshield.org --------------------------------------------------------------------- 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