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 Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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.