Jump to content

Simplest "login" ever wont work


Rifts

Recommended Posts

This is most likely one of the following reasons:

1 - The pass vaildation is using Not Equal To(!=) instead of Equal To (==)

2 - The form input fields are not named correctly. Change the names to match.

 

If you are still stuck post your whole code, so we can have a look over it.

 

Regards, Paul.

 

 

 

yeah i actaully just changed it to this and it workes now

if ($_POST['login'] == 'admin' && $_POST['pass'] == '1234') {
                   echo "win";
             } else {
                  echo "fail";
              }

 

I always have the same trouble, just fiddling around with it usually helps myself.

 

Its like I always use

if(!isset($_SESSION))

is the one I start off with and then just bump it up later on, adding an stage of it every time to see where I am going wrong usually helps me, but thats just my way of doing things.

 

 

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.