KodiTiger Posted December 22, 2010 Share Posted December 22, 2010 Hi go easy on me please, I'm a PHP newbie. I've got a HTML form that posts information to a PHP page. This PHP page runs some code and has a counterInt that is = 1 if everything is okay, and is = 0 otherwise. I want the PHP page to automatically redirect to another PHP page if counterInt = 1. But using the header() redirect thing apparently doesn't let me already have code before it. How can I make it redirect at the appropriate point in my code, if and only if counterInt is 1? Thanks very much . Quote Link to comment https://forums.phpfreaks.com/topic/222363-redirecting-after-some-code-has-been-processed/ Share on other sites More sharing options...
bh Posted December 22, 2010 Share Posted December 22, 2010 Hi, this is from the PHP manual: Remember that header() must be called before any actual output is sent header() Quote Link to comment https://forums.phpfreaks.com/topic/222363-redirecting-after-some-code-has-been-processed/#findComment-1150215 Share on other sites More sharing options...
litebearer Posted December 22, 2010 Share Posted December 22, 2010 show us your php page Quote Link to comment https://forums.phpfreaks.com/topic/222363-redirecting-after-some-code-has-been-processed/#findComment-1150291 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.