So I'm trying to use a session to move a variable through pages. For some reason I literally cannot access anything from index.php to archive. I declare my session at the very top of my header.php like:
<?php
if(!isset($_SESSION))
{
$_SESSION['catID'] = 3;
}
?>
Then I move to the archive.php which pulls in the header via <?php get_header() ?> and my session is suddenly gone. I try to echo it out and get nothing. Same thing happens with normal variables - like it's out of scope.
Anybody else have a similar problem or a solution?