Re: ok, I ask again.. how to encrypt to be able to match database info?
| From: | Antonio S. Martins Jr. | Date: | Mon, 21 Jan 2002 19:46:40 +0000 |
| Subject: | Re: ok, I ask again.. how to encrypt to be able to match database info? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81426@lists.php.net to get a copy of this message | ||
On Mon, 21 Jan 2002, Hawk wrote:
> I've asked this several times but it doesn't seem like anyone understands my
> problem, the passwords are encrypted in the database, but I don't know how
> to match an unencrypted password from the login form with the database?
> is it possible to encrypt the password I sent from the form in php or does
> that have to be done in mysql?
> in any case, how do I do it?
> If you don't have anything bright to say, don't, in some of the replys I've
> had earlier it sounds like you think I'm an idiot...
> And even if I am, I don't want to be refered as one ;)
How you had encrypted your password? with MySQL 'password' function? if
yes, try:
select user, ... from table
where user = "$user" and passwd = password("$passwd")
I think you get the idea :)
hope this helps,
Antonio.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows |
| WorldNet Internet Maringa - PR - Brasil | what evil lurks in the |
| E-Mail: shadow@wnet.com.br | Heart of Men!" |
| shadow@uem.br | !!! Linux User: 52392 !!! |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This e-mail message is 100% Microsoft free!
/"\
\ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \