note 15965 added to function.header
| From: | png at infinetcom dot com | Date: | Wed, 10 Oct 2001 15:52:46 +0000 |
| Subject: | note 15965 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18782@lists.php.net to get a copy of this message | ||
this is my first project using php and is now struggling to use HEADER to do a redirect. I am now
working on an action
page which writes all the info from the form page to the database and then it should redirect back
to the index.php;
I have the session_start() in the first
line and then I enclosed all the sql/php statements within ob_start() and
ob_end_clean(); just below the ob_end_clean() i have the following lines :
$nextpage = "/index.php";
$nextpage .= "?" . session_name() . "=" . session_id();
echo $nextpage;
header ("Location: " . $nextpage);
but the page give me 2 errors :
1) Warning: Cannot send session cache limiter - headers already sent ....
2) Warning: Cannot add header information - headers already sent by ..
i already have the output_buffering = On
in the php.ini
I appreciate if anyone can give a helping hand.
--
http://www.php.net/manual/en/function.header.php
http://master.php.net/manage/user-notes.php?action=edit+15965
http://master.php.net/manage/user-notes.php?action=delete+15965
http://master.php.net/manage/user-notes.php?action=reject+15965