Jump to content

md5 encryption problems


dominatrix

Recommended Posts

Hi guys, i've been writing a site that includes a login feature but i've encountered a problem when it comes to logging in.
When registering i've set up the password variable as

$registerpassword=md5(addslashes($_POST['password']));

which all works fine, then when i've written the login page with

$loginpassword=md5(addslashes($_POST['password']));

now, i've gone through the whole lot putting echo instructions for every if statement to see where it is messing up, and it is always failing at authenticating the username &/or password. I eventually found the source of the problem, when i copy the md5 hash from phpmyadmin, remove the md5 instruction in the login page so it looks like this:

$loginpassword=addslashes($_POST['password']);

and then login using the password i copied from the mysql database, it logs in fine... leading me to some strange suspicion that the md5 encryption is screwing up some how.
I've tried re-registering many times, made sure all the variables are working fine and removing the hashing on the registering page and it all leads back to the md5 encryption on the login page...

have you guys got any ideas?

cheers, dominatrix

[color=white]what a shit first post :/[/color]
Link to comment
https://forums.phpfreaks.com/topic/34191-md5-encryption-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.