Liquid Fire Posted January 7, 2007 Share Posted January 7, 2007 how can i redirect the user to another page automatically even after information has been sent to the header(which means i can't use header())? Link to comment https://forums.phpfreaks.com/topic/33183-redirecting-user-after-information-has-been-sent-to-the-user/ Share on other sites More sharing options...
chronister Posted January 7, 2007 Share Posted January 7, 2007 Haha,I just had to figure this one out myself. I used a bit of good ol javascript for it..[code]<script type="text/javascript"><!--window.location = "destination_page.php"//--></script>[/code]I added this at the bottom of a page below an if / elseif / else, and it works great.Nate Link to comment https://forums.phpfreaks.com/topic/33183-redirecting-user-after-information-has-been-sent-to-the-user/#findComment-154855 Share on other sites More sharing options...
trq Posted January 7, 2007 Share Posted January 7, 2007 You can either wrap all your code within the output buffer, or arange your logic correctly so no output is sent prior to calling the header() function. Link to comment https://forums.phpfreaks.com/topic/33183-redirecting-user-after-information-has-been-sent-to-the-user/#findComment-154910 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.