Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.