beaux1 Posted April 10, 2007 Share Posted April 10, 2007 I'm having an MD5 problem when logging in with my PHP code. Basically, the registration form encrypts the users password in MD5. That's all fine. Then we have the login form, the password entered is then converted to MD5 so the SQL DB can validate it. I debugged it and the entered password is successfully being encrypted by echoing $password. My problem is that it doesn't validate with the SQL database and instead goes back to login.php (because it failed). Any help would be greatly appreciated, thanks. http://pastebin.ca/433142 Link to comment https://forums.phpfreaks.com/topic/46461-solved-md5-phpsql-problem/ Share on other sites More sharing options...
beaux1 Posted April 10, 2007 Author Share Posted April 10, 2007 Fixed. My password field in SQL DB had to be set at varchar(32) where as it was set at varchar(30) before. Reason for this is because MD5 encryption is 32 figures long, therefore it would have to be 32. Link to comment https://forums.phpfreaks.com/topic/46461-solved-md5-phpsql-problem/#findComment-226036 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.