RE: [PHP] md5 encrypt problem

2003-03-11 Thread John W. Holmes
 Having a wee bit o' trouble with a simple md5 script:
 
   for ($x=1 ; $x 62 ; $x++) {
 
   $mypass = sports . $x;
   $mypass = md5($mypass);
 
   dbConnect(UPDATE user_login SET password = '$mypass' WHERE
 school_id
 = $x);
 
   }
 
 For some reason, when I attempt to login with my md5'd user supplied
 password I get no match.  Bizarre, haven't had this problem
 before...

Is the 'password' column in your database a CHAR or VARCHAR column with
a length of 32? If it is, then show the code where you validate someone
logging in. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



Re: [PHP] md5 encrypt problem

2003-03-11 Thread Noah
Exactly right, John.

Sorry to clutter the forum -- it was a varchar(30)!

Thanks,

--Noah
 

- Original Message - 
From: John W. Holmes [EMAIL PROTECTED]
To: 'CF High' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 4:06 AM
Subject: RE: [PHP] md5 encrypt problem


  Having a wee bit o' trouble with a simple md5 script:
  
for ($x=1 ; $x 62 ; $x++) {
  
$mypass = sports . $x;
$mypass = md5($mypass);
  
dbConnect(UPDATE user_login SET password = '$mypass' WHERE
  school_id
  = $x);
  
}
  
  For some reason, when I attempt to login with my md5'd user supplied
  password I get no match.  Bizarre, haven't had this problem
  before...
 
 Is the 'password' column in your database a CHAR or VARCHAR column with
 a length of 32? If it is, then show the code where you validate someone
 logging in. 
 
 ---John W. Holmes...
 
 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/
 
 


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



[PHP] md5 encrypt problem

2003-03-10 Thread CF High
Hey all.

Having a wee bit o' trouble with a simple md5 script:

  for ($x=1 ; $x 62 ; $x++) {

  $mypass = sports . $x;
  $mypass = md5($mypass);

  dbConnect(UPDATE user_login SET password = '$mypass' WHERE school_id
= $x);

  }

For some reason, when I attempt to login with my md5'd user supplied
password I get no match.  Bizarre, haven't had this problem
before...

Any help always appreciated

--Noah

--




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