igurv Posted July 15, 2010 Share Posted July 15, 2010 How do I write IF or statement.... if (state == "texas" || "michigan" || "maryland") { header("url=abc.html"); } elseif (state == "california") { header("url=def.html"); } else { header("url=xyz.html"); } Is this correct ?? Thanks Ig Link to comment https://forums.phpfreaks.com/topic/207880-if-or-redirect/ Share on other sites More sharing options...
Maq Posted July 15, 2010 Share Posted July 15, 2010 Is this correct ?? Why do you think it's incorrect? Link to comment https://forums.phpfreaks.com/topic/207880-if-or-redirect/#findComment-1086727 Share on other sites More sharing options...
premiso Posted July 15, 2010 Share Posted July 15, 2010 How do I write IF or statement.... No, it is not correct. if ($state == "texas" || $state == "michigan" || $state == "maryland) { // Yep its a state } Would be "proper". P.S. Maq hates you. Link to comment https://forums.phpfreaks.com/topic/207880-if-or-redirect/#findComment-1086730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.