Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Issue with Super Globals
September 14, 2006, 9:04 pm
rate this thread
I am currently having an issue with accessing any type of Super Global
variable from within my scripts. The issue occurs when I attempt to get
the data from a Super Global variable from within a function that
resides in a script that is executed via include() or require().
Here's a layout of what occurs:
- process_login.php sets session data after a successful submission of
username and password. The script sets values for $_SESSION['user'] and
$_SESSION['auth']. Also, session_start() has been used at the beginning
of the script. This script has no output, but forwards the user via
header() to ./display.php.
display.php looks up the proper page to require() via a text file list
of pages. This script has also used session_start() and sets
the value for $_SESSION['root_directory'].
- ./manage_tasks.php is require()'d into display.php
- function showAllTasks() attempts to get $_SESSION['auth'] to
remove or edit the task if their authorization integer is greater than
or equal to a set value within the script.
showAllTasks() cannot get the session data. Even if display.php,
manage_task.php, and showAllTasks() use session_start(), the function
cannot get the session data.
What is causing this?