Hello All,
I have a page that passes a session variable to another page which is then used in an if/else statement. For some reason itsa giving me error messages, and I'm not sure whats up with it.
Heres the page that creates the variable
<?php
session_start(); // start session
$_SESSION['name'] = 'sport';
?>
and heres the page with the if else statment :
<?php
session_start();
$_SESSION;
//$name = 'Jester';
if ( $name == 'sport' ) { ?>
<table>stuff in here</table>
<? } else { ?>
<table>stuff in here</table>
<? } ?>
and finally - here are the error messages that I am getting :
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\wamp\www\work\hebbingo\site\test.php:11) in c:\wamp\www\work\hebbingo\site\test.php on line 13
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\wamp\www\work\hebbingo\site\test.php:11) in c:\wamp\www\work\hebbingo\site\test.php on line 13
As you've guessed, I'm pretty new to this so I have probably missed something basic - any ideas?
Cheers
Fogo