Mohanddo Posted November 23, 2009 Share Posted November 23, 2009 Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is output before this redirect i cant use the header function. Thnx for your time Link to comment https://forums.phpfreaks.com/topic/182627-php-redirecting/ Share on other sites More sharing options...
trq Posted November 23, 2009 Share Posted November 23, 2009 There is no point in outputting anything if all you are going to do is redirect your client. I suggest organising your code properly so you can use header. Link to comment https://forums.phpfreaks.com/topic/182627-php-redirecting/#findComment-963885 Share on other sites More sharing options...
Anzeo Posted November 23, 2009 Share Posted November 23, 2009 There is no point in outputting anything if all you are going to do is redirect your client. I suggest organising your code properly so you can use header. Second that. If you do want a quick solution (this ain't a good one!) try using ob_start() at the beginning of your code and ob_flush() after the header function call. ob stands for output buffer, basically it will halt all output until you flush the buffer. Link to comment https://forums.phpfreaks.com/topic/182627-php-redirecting/#findComment-963943 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.