Re: regarding password in mysql?
| From: | Negrea Mihai | Date: | Sat, 28 Jul 2001 20:03:16 +0000 |
| Subject: | Re: regarding password in mysql? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60045@lists.php.net to get a copy of this message | ||
>
> 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: mihai@negrea.net
phone: +4093612495
ICQ: 102093534