I'm trying to learn how to use sessions, but there is one thing I don't understand. In 'page1.php' I have this code:
<?php
session_start();
$HTTP_SESSION_VARS['test'] = "yes";
header("Location: page2.php");
?>
In 'page2.php' I have this code:
<?php
session_start();
?>
<!-- All usual html code here -->
<?php
echo $HTTP_SESSION_VARS['test'];
?>
<!-- All usual html code here -->
In page2.php nothing shows up... Why?
If I put everything (except the header!) in one file, then it works just fine...