Jump to content

I'm not sure if I am using the conditions correctly


FinalFrontier

Recommended Posts

I have a rule of conditions for access into an area of my site. The problem is, that when the wrong password is given, its still giving access to the area of the site. It is happening because I am using conditions wrong, and ask if someone could help me out by pointing out the correct way to do it.

 

When I say "conditions", I am referring to things such as && and ||

 

if ($row['laybypassword'] == $_POST['lay-bypassword'] && $row['status'] == "A" || $row['status'] == "B" || $row['status'] == "C")

 

So, if the correct password is given, and the row status equals A, B, or C, then do foobar.

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.