Re: [PHP] regarding password in mysql?
> > Hi dearest friends, > > while insertion of an employee number and password i am inserting > like > > insert into employee values('$empid',PASSWORD('$passwd')); > > how to decrypt it while comparision during login. > > Thanks in advance > > Regards > -Balaji - you get the password from the user login into $loginpasswd; - you do a "select * from employee where empid = \"$empid\" AND passwd = PASSWORD(\"$loginpassword\")" if the result is empty the login is incorrect -- Negrea Mihai web: http://negrea.sio.net email: [EMAIL PROTECTED] phone: +4093612495 ICQ: 102093534 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] regarding password in mysql?
On 28-Jul-2001 Balaji Ankem wrote: > Hi dearest friends, > > while insertion of an employee number and password i am inserting > like > > insert into employee values('$empid',PASSWORD('$passwd')); > > how to decrypt it while comparision during login. > You don't. "select id from employee where id='$usrid' and passwd=PASSWORD('$usrpass') "; If you get a record back, the password matched. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] regarding password in mysql?
I was just looking in the help to find out what PASSWORD does... but I can't find it. But I can offer this advice. You can't decypt the password, so to check if the password entered is valid, you encypt it, and compare the 2 hashed passwords.. Andrew - Original Message - From: Balaji Ankem To: [EMAIL PROTECTED] Sent: Saturday, July 28, 2001 11:35 AM Subject: [PHP] regarding password in mysql? Hi dearest friends, while insertion of an employee number and password i am inserting like insert into employee values('$empid',PASSWORD('$passwd')); how to decrypt it while comparision during login. Thanks in advance Regards -Balaji -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]