sstangle73 Posted April 27, 2009 Share Posted April 27, 2009 how do i do something to the effect of a header("Location: blah"); if i have already sent text? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/155782-solved-header/ Share on other sites More sharing options...
premiso Posted April 27, 2009 Share Posted April 27, 2009 If you do not want to modify your page and put a "band-aid" on the issue. Output buffering is what you want to look into. ob_start is a good spot to start. Quote Link to comment https://forums.phpfreaks.com/topic/155782-solved-header/#findComment-820045 Share on other sites More sharing options...
sstangle73 Posted April 27, 2009 Author Share Posted April 27, 2009 ob_start(); header("Location: http://nyelitefc.com/thanks_contact.php"); ob_end_flush(); didnt work? Quote Link to comment https://forums.phpfreaks.com/topic/155782-solved-header/#findComment-820048 Share on other sites More sharing options...
premiso Posted April 27, 2009 Share Posted April 27, 2009 ob_start(); header("Location: http://nyelitefc.com/thanks_contact.php"); ob_end_flush(); didnt work? ob_start has to be placed at the very top of the script, before the output. You do not need to worry about flushing it as when the script is down the output will automatically be flushed. But doing the output has already been sent since ob_start is not before the output. Make sense? Quote Link to comment https://forums.phpfreaks.com/topic/155782-solved-header/#findComment-820050 Share on other sites More sharing options...
sstangle73 Posted April 27, 2009 Author Share Posted April 27, 2009 thanks! Quote Link to comment https://forums.phpfreaks.com/topic/155782-solved-header/#findComment-820054 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.