PHP/SQL login script

I am trying to get a basic PHP login script working. I can connect to the MSSQL database with no issues. The form submits just fine. I keep getting an error message that the passwords don’t match. I added two print statements:
print($_POST[‘pass’]);
print($info[‘Password’]);

They both print the same data but it still says the password is wrong. There is no encryption. The data in the DB is plaintext and I am not using an encryption on the $_POST[‘pass’] var.

Does anyone have any suggestions?
Thanks,
– Steve

Any leading or trailing spaces?

How are you checking the passwords?

What’s the rest of the code?

Help us help you and give us a bit more detail. Remember WE have never seen your code before.

Just a little notice… Storing passwords as clear text is a bad idea. It’s better to store a hash of the password (like MD5 or SHA*). Even better, a seed should be added to the password to add some security.

Sponsor our Newsletter | Privacy Policy | Terms of Service