Help with Sessions

From: Date: Fri, 28 Feb 2003 15:54:24 +0000
Subject: Help with Sessions
Groups: php.general 
Request: Send a blank email to php-general+get-137576@lists.php.net to get a copy of this message
Hi I just have a little problem with sessions. my code: <htmL> <head><title>TEST</title> </head> <body> <?php session_start(); if ($submit) { echo 'Hello '.$_SESSION['ID']; } else { $_SESSION['ID']=2; echo "<form>\n"; echo "<input type=submit name=submit>\n"; echo "</form>\n"; } ?> </body> </html> my error msgs: Warning: Cannot send session cookie - headers already sent by (output started at d:\apache_docroots\internal.infomart.ca\infodesk\test.php:6) in d:\apache_docroots\internal.infomart.ca\infodesk\test.php on line 8 Warning: Cannot send session cache limiter - headers already sent (output started at d:\apache_docroots\internal.infomart.ca\infodesk\test.php:6) in d:\apache_docroots\internal.infomart.ca\infodesk\test.php on line 8 Can anyone please help? Thanks....

« previous php.general (#137576) next »