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 Quote 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? Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/207880-if-or-redirect/#findComment-1086730 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.