Jump to content

if function is failing


MadnessRed

Recommended Posts

ok, here is my if function. The bit where it tells you the password won't be shown when I finish the script but atm it is proving useful.

 

if ($_GET['password'] != $row['password']){
die("Incorrect Password<br />You said: ".$_GET[password]."<br />Actual :".$row['password']);
}

 

I would expect that code above to say. if the (get password) and the password in the database base are different, then die. And when it dies I would expect he to md5 hashes that are displayed to be different.

 

however here the error.

 

Incorrect Password

You said: 5f4dcc3b5aa765d61d8327deb882cf99

Actual :5f4dcc3b5aa765d61d8327deb882cf99

Link to comment
https://forums.phpfreaks.com/topic/118103-if-function-is-failing/
Share on other sites

er...maybe one of them somehow got a \n added onto the end, depending on where they came from? Or maybe the $row is on a column type that forces spaces concated to the end to make the full var type (like if it's supposed to be 40 chars but only 32 it will add 8 spaces)? Try trimming them.

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.