Someone help...error posted

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rathlon
Forum Commoner
Posts: 45
Joined: Sun Nov 10, 2002 8:07 pm

Someone help...error posted

Post by rathlon »

Warning: Cannot send session cookie - headers already sent by (output started at d:\web.root\xx_db\view_module.php:9) in d:\web.root\xx_db\view_module.php on line 108

here is my code:

$title = $row[$k];

session_start();
$ses_title = $title;
session_register("ses_title");

This should be pretty easy...what am I doing wrong?
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

well, therror spells it out. you are outputting something to the client before you start the session. what do you have preceeding this code?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

please read this thread: Sticky: Before Post Read: Warning: Cannot add header information
it applies to cookies as well as they are shipping within the response headers
Post Reply