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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php