westminster86 Posted April 17, 2008 Share Posted April 17, 2008 Is there an alternative to using the header to redirect, as I am getting the follwoing warning message. Cannot modify header information - headers already sent Link to comment https://forums.phpfreaks.com/topic/101547-headers/ Share on other sites More sharing options...
conker87 Posted April 17, 2008 Share Posted April 17, 2008 You need to set the redirect header before ANYTHING is outputted. That means any html, echo or prints before are a no-no. http://www.phpfreaks.com/forums/index.php/topic,37442.0.html Link to comment https://forums.phpfreaks.com/topic/101547-headers/#findComment-519406 Share on other sites More sharing options...
GingerRobot Posted April 17, 2008 Share Posted April 17, 2008 The reason why you are getting that error message is that there is output prior to sending the header. You must change headers prior to output. Whilst you can use output buffering, it can often make things messy. Its more likely that you need to restructure your code. Perhaps if you post up what you've got, we can make some suggestions. Link to comment https://forums.phpfreaks.com/topic/101547-headers/#findComment-519410 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.