Hello... I have been given this site to fix a few things and it's a bit of a mess... it's like this:
There is the main file, index.php, where I start a session and define a variable with
$_SESSION['var']="something";
Then there are subdirectories, that have their index.php files, the difference is that they don't have the variable 'var' defined in a session.
Now the problem is that if a user starts browsing a site NOT from main index.php but from a subdirectory, the index.php in that subdirectory doesn't have the $_SESSION['var'] defined. That's a problem.
Now, is there a way to define this variable 'var' "globally" or should I so so that all the index.php pages in the site will know the value of it... without user having to first visit the main INDEX.php??