br3nn4n Posted January 6, 2008 Share Posted January 6, 2008 Codey-code: <?php if (!isset($_GET['dog'])) || (!isset($_GET['cat'])) ?> Firstly, is there even a way to do and-or in PHP, something like this: &| ? And this is the parse error I get with the above code-- Parse error: syntax error, unexpected T_BOOLEAN_OR TIA Quote Link to comment https://forums.phpfreaks.com/topic/84784-isset-for-two-items/ Share on other sites More sharing options...
GingerRobot Posted January 6, 2008 Share Posted January 6, 2008 The OR operator is, in effect, an AND OR operator, since it returns true if either or both statements are true. As for the above code, you've an extra closing bracket. Try: <?php if (!isset($_GET['dog']) || (!isset($_GET['cat'])) ?> Quote Link to comment https://forums.phpfreaks.com/topic/84784-isset-for-two-items/#findComment-432120 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.