Hey all.

I'm running an online sport report that is member protected; i.e. users need
to login to gain site access.

When a new user signs up, I set their username to their email address &
generate a temporary password for them using rand() & md5():

$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.

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.

I've had no problem using md5() before and am completely dumbfounded as to
why this is not working.

If anyone has any clues as to what might be happening; i.e. why the md5'd
submitted plain text password does not match the stored md5'd password,
please, please let me know.

The email complaints are piling up and I'm getting nowhere.....

--Noah



--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to