Error message
| From: | Terry J Daichendt | Date: | Thu, 18 Sep 2008 21:52:14 +0000 |
| Subject: | Error message | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-280466@lists.php.net to get a copy of this message | ||
I'm pasting this code from the example at php.net and getting these errors. Can anyone determine what I'm doing wrong?
<?php
// page1.php
session_start();
echo 'Welcome to page #1';
$_SESSION['favcolor'] = 'green';
$_SESSION['animal'] = 'cat';
$_SESSION['time'] = time();// Works if session cookie was accepted echo '<br /><a href="page2.php">page 2</a>'; // Or maybe pass along the session id, if needed echo '<br /><a href="page2.php?' . SID . '">page 2</a>'; ?> Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/terryswe/public_html/hisdailybread/session.php:6) in /home/terryswe/public_html/hisdailybread/session.php on line 9 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/terryswe/public_html/hisdailybread/session.php:6) in /home/terryswe/public_html/hisdailybread/session.php on line 9 Welcome to page #1 Terry