Results 1 to 4 of 4
Feb 11, 2010, 18:25 #1
PHP and MySQL different SHA1/MD5?
Hey, Im boggled now!
I am getting different passwords for the same string "jboy".
I run this in MySQL, and it stores the output in the database:
I echo this after typing in "jboy" in a field
echo $this->password = md5($password);
They don't match up, is there something I don't know about here?
Feb 11, 2010, 18:40 #2
- Join Date
- Sep 2005
- 2 Post(s)
- 0 Thread(s)
Are you sure there isn't any whitespace, newlines or anything of the sort that might be interfering? Use trim().
It seems to be the PHP one that's the problem. This online generator clearly uses PHP and it outputs the same as what your MySQL is producing. So the problem must lie with whatever you're passing to to PHP's md5().
Feb 11, 2010, 19:18 #3
Feb 11, 2010, 19:21 #4