Jump to content

If condition problem....


mkosmosports

Recommended Posts

Ive got the strangest issue and Ive spent the last few hours on it!!

Ive got this condition:

if ($group != "13" && $season <= "2005")
  {
    header('Location: error.html');
  }

This works great, but wait, there is another group variable for which I want the season variable to be able to go lower than 2005. Logically, I would try the below condition....

if ($group != "13" || $group != "14") && $season <= "2005")
  {
    header('Location: error.html');
  }

But now, the "unless the groups are NOT 13 OR 14" condition does not work anymore. The second condition is the only one that works correctly. Is there a rule where you cannot have if (NOT EQUAL or NOT EQUAL)?

Thanks for any advice....
mkosmosports
Link to comment
Share on other sites

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.