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 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 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 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
Archived
This topic is now archived and is closed to further replies.