$HTTP_SESSION_VARS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philip D Heady

    $HTTP_SESSION_VARS

    Ok, I have this form that does a $PHP_SELF post, goes through error
    checking, then redirects to loc( );

    I am setting a session as follows:

    if(!session_id( )) {
    session_start() ;
    $sid = $PHPSESSID;
    }

    then I am doing post $PHP_SELF:

    if ($form) {

    if (!$ltype) {
    $msg = "Please make a selection.";

    } else {

    session_registe r($ltype);

    loc("index2.php ?sid=$sid&ltype =$ltype");

    }
    }


    Now I get a session ID just fine, but on index2.php I can only retrieve via
    HTTP_GET_VARS, and HTTP_SESSION_VA RS is blank. So what do I need to do to
    access the session variable I am registering?

    I am doing this on index2.php and still I get nothing. Am I regisering
    variables wrong? I have Superglobals turned on in php.ini.

    while (list ($key, $val) = each ($HTTP_SESSION_ VARS)) {
    print $key . " = " . $val . "<br>";
    }


Working...