RE: [PHP] problems with sessions.

From: Date: Wed, 01 Nov 2000 08:17:28 +0000
Subject: RE: [PHP] problems with sessions.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23118@lists.php.net to get a copy of this message
<snip> > > ----------------session01.php------------------------ > <html> > <head> <title> Session 01 </title> > </head> > <body> > <p> This is the first file in session. The variable is > <? > session_start(); <snip> > This is the first file in session. The variable is > Warning: Cannot send session cookie - headers already sent by (output > started at /home/dchawla/public_html/Learning/session01.php:6) in > /home/dchawla/public_html/Learning/session01.php on line 7 my understanding (and I am a newbie so could be terribly wrong :-) is that you must have your session start as the very first output in the code. You have put other browser output before that - e.g. <html> > <head> <title> Session 01 </title> > </head> > <body> so restructure it so that the session start comes before that and try again :-) Jim Carey

« previous php.general (#23118) next »