Vivid Lust Posted August 26, 2008 Share Posted August 26, 2008 Hi, this is probably completely wrong but: I want the page to redirect to another(shown in the code) if $select doesnt equal Positive, Negative or Netural This is what i tried: <?php if($select !== "Positive") or if($select !== "Negative") or if($select !== "Neutral") { header('location:feedback.php?msg=2'); } ?> Please correct me! And thanks in advanced! Link to comment https://forums.phpfreaks.com/topic/121420-if-or-help/ Share on other sites More sharing options...
Mchl Posted August 26, 2008 Share Posted August 26, 2008 if($select != "Positive" || $select != "Negative" || $select != "Neutral") { header('location:feedback.php?msg=2'); } Link to comment https://forums.phpfreaks.com/topic/121420-if-or-help/#findComment-626106 Share on other sites More sharing options...
trq Posted August 26, 2008 Share Posted August 26, 2008 if (!in_array($select,array('Positive','Negative','Neutral'))) { header('location:feedback.php?msg=2'); exit; } Link to comment https://forums.phpfreaks.com/topic/121420-if-or-help/#findComment-626107 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.