So if I start a session on one page, then send information via $_SESSION
should I put session_start()
at the top of the new page?
For Example:
page1.php:
session_start();
# code makes $foo
$_SESSION["var"] = $foo;
header("LOCATION: page2.php");
die;
page2b.php:
$foo = $_SESSION["var"];
# code uses $foo somehow
Does page2.php need session_start.php
at the beggining of it? Especially if the only way to access it was through a page that starts a session?