Timed Redirect

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
edawson003
Forum Contributor
Posts: 133
Joined: Thu Aug 20, 2009 6:34 am
Location: Los Angeles, CA - USA

Timed Redirect

Post 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?
Last edited by edawson003 on Tue Oct 13, 2009 7:57 am, edited 2 times in total.
robnet
Forum Commoner
Posts: 85
Joined: Mon Aug 10, 2009 8:32 am
Location: South East, UK

Re: Timed Redirect

Post 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
Post Reply