I'm trying to test for multiple string conditions in the if operator but it does not work. I'm passing a variable called id from one page to another. Here is the code for the second page:
if ($id != "one" || $id != "two" || $id != "three")
{
print ("id is not recognized");
}
else
{
//do some other stuff
}
But it does not work. If I pass one, two, or three to the page I get the error message. However, if I remove the last two constraints from the if statement and make it read ($id != "one") then the control structure works and it does some other stuff.
Any help is appreciated.