index.php
<?php
session_start();
header("Location: somewhere.php");
?>
<html>
<head></head>
<body>
<?php $_SESSION['foo'] = 'bar'; ?>
</body>
</html>
somewhere.php
<?php
session_start();
echo $_SESSION['foo'];
?>
I set a session variable in the body after a header call in index.php. Then it's found in somewhere.php. This happens even after restarting the browser. How is this happening?