Hi,
Saturday, March 1, 2003, 1:54:24 AM, you wrote:
PKI> Hi
PKI> I just have a little problem with sessions.
PKI> my code:
PKI> <htmL>
PKI> <head><title>TEST</title>
PKI> </head>
PKI> <body>
PKI> <?php
PKI> session_start();
PKI> if ($submit) {
PKI> echo 'Hello '.$_SESSION['ID'];
PKI> } else {
PKI> $_SESSION['ID']=2;
PKI> echo "<form>\n";
PKI> echo "<input type=submit name=submit>\n";
PKI> echo "</form>\n";
PKI> }
?>>
PKI> </body>
PKI> </html>
PKI> my error msgs:
PKI> Warning: Cannot send session cookie - headers already sent by (output
PKI> started at d:\apache_docroots\internal.infomart.ca\infodesk\test.php:6) in
PKI> d:\apache_docroots\internal.infomart.ca\infodesk\test.php on line 8
PKI> Warning: Cannot send session cache limiter - headers already sent (output
PKI> started at d:\apache_docroots\internal.infomart.ca\infodesk\test.php:6) in
PKI> d:\apache_docroots\internal.infomart.ca\infodesk\test.php on line 8
PKI> Can anyone please help? Thanks....
move session_start() to the first line in your file
--
regards,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php