Re: md5() with rand() || Strange results, need help....

From: Date: Fri, 14 May 2004 02:13:29 +0000
Subject: Re: md5() with rand() || Strange results, need help....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-186190@lists.php.net to get a copy of this message
* Thus wrote CF High (noah@newminddesign.com): > > $username = strip_illegals($_POST['email']); > $plain_pass = rand(); > $password = md5($plain_pass); > > I then insert their login info into our member's table. > > Unexpectedly, when users attempt to login no matching record is found. Are you sending them the $plain_pass or $password? > Their login submits two post fields (username & password): > > $username = trim(strtolower($_POST['username'])); > $password = trim(strtolower($_POST['password')); > $password = md5($password); > > The username matches, but the password does not -- I've echoed the md5'd > submitted password & maddenlingly, it doesn't match. Other wise I'm reading this to say your system is evaluating md5('foo') != md5('foo') as being true. Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#186190) next »