I need some help passing a session variable with a header() function.
According to www.php.net/header, the documentation states:
*Note*: Session ID is not passed with Location header even if
<session.configuration.php#ini.session.use-trans-sid> is enabled. It
must by passed manually using *SID* constant.
so, I'm trying to manually pass the SID, but not having any luck. Here
is a snippet of my code:
There is a file login.php which has session_start(); and sets
$_SESSION["username"] with the username you logged in with from
index.php and has a form to click View Pending Requests which has the
action of option.php.
-- option.php --
if ($_POST["option"] == "View Pending Requests")
echo "You have not logged in";
so you click on View Pending Requests, and the URL in your browser is:
but viewpending.php says "You have not logged in". Why is that?