Posted by Sonia Covarrubias on 08/17/06 07:38
Ok.. to clarify, here's a code sample..
<?php
session_start();
?>
<html><head><title>Session Test Page</title></head>
<body>
<h1>Session Test Page!</h1>
<p>
<?php
echo '<b>session id:</b> '.session_id()."<p>";
$_SESSION['testvar'] = 'hello';
echo '<b>session variables:</b> ';
print_r($_SESSION);
?>
</body></html>
Here's the error message:
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
C:\htdocs\php\sessiontest.php:1) in
C:\htdocs\php\sessiontest.php on line 2
Something is wrong?
Navigation:
[Reply to this message]
|