headers already sent error
Posted: Sun Sep 17, 2006 7:21 am
How could I rewrite this code so that while the page is redirecting, a message such as "please wait... you are being redirected" is shown without a "headers already sent" error?
Using this buffer method does not work... The page is redirected without errors but without the "please wait" message.
I don't want to use meta refresh nor javascript because these can be disabled in the browser options.
Using this buffer method does not work... The page is redirected without errors but without the "please wait" message.
I don't want to use meta refresh nor javascript because these can be disabled in the browser options.
Code: Select all
<?php
ob_start();
echo "<p>please wait... you are being redirected</p>";
header("Location: somepage.php");
ob_end_flush();
exit;
?>