Page 1 of 1

Timed Redirect

Posted: Tue Oct 13, 2009 12:04 am
by edawson003
I After I sumbit a form, I wanted a temporary redirect page away and then back to the form, so I found this time redirect html code on the net:

Code: Select all

<head>
<meta http-equiv="refresh" content="5;url=http://www.someurl.com/membersarea/members.php">
</head>
As far as I know PHP doesn't seem to have a redirect based on timer, so I used this. It seems to work as far as redirecting, but this lil error pops up lining the top of the page.
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/area/public_html/membersarea/addsuccess.php:2) in /home/area/public_html/membersarea/exaddsuccess.php on line 5

Code: Select all

<?
ob_start();
session_start();
I have another memmber only php header redirect so I already implemented:
<?
ob_start();
session_start();


Any thoughts on silencing this error?

Re: Timed Redirect

Posted: Tue Oct 13, 2009 5:04 am
by robnet
It looks like you're trying to send header info after (html) output has already been sent.

session_start() uses headers to initiate the session. If you've already written output to the browser you will see this error. If you post the code we can take a look