Voodoo Jai Posted July 8, 2008 Share Posted July 8, 2008 I have an IF statement that if the condition is not met then the user is redirected to another page. I have this piece of code but it does not work I dont understand the manual, so could someone please explain how to do it. IF ($ShowResult < 11) { echo "View the takeaway details requested"; } ELSE { http_redirect('http://www.lostmymenu.com/newpage.php'); } As ususal many thanks in advance VoodooJai Quote Link to comment https://forums.phpfreaks.com/topic/113768-solved-conditional-if-statement-to-redirect-user/ Share on other sites More sharing options...
cleibesouza Posted July 8, 2008 Share Posted July 8, 2008 Try using: header('Location: http://urlGoesHere/') instead of http_redirect Quote Link to comment https://forums.phpfreaks.com/topic/113768-solved-conditional-if-statement-to-redirect-user/#findComment-584632 Share on other sites More sharing options...
Voodoo Jai Posted July 8, 2008 Author Share Posted July 8, 2008 Works a treat thank you very much. VoodooJai Quote Link to comment https://forums.phpfreaks.com/topic/113768-solved-conditional-if-statement-to-redirect-user/#findComment-584715 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.