RE: [PHP] Session questions From: VFSA-eRentals (webmaster <email protected>)
Date: 07/16/01

try just echoing $usernamelogin and see if you can get an out put from that ... it could be because $usernamelogin is not getting set

-----Original Message-----
From: Jason Rennie [mailto:jwrennie <email protected>]
Sent: Monday, July 16, 2001 6:14 PM
To: php-general <email protected>
Subject: [PHP] Session questions

Hi all,

This might be a dumb question but can anybody tell me why on earth this
doesn't work ?

session_start()
$logged_in = session_is_registered("auth");

if($logged_in != true)
{

        if(!(pam_auth($usernamelogin,$pass,&$error)))
        {
                // send an error if it doens't login in
        }
        else
        {
                session_register($username);
                session_register($auth);
                $HTTP_SESSION_VARS["username"] = $usernamelogin;
                $HTTP_SESSION_VARS["auth"] = 1;
                

        }

        $user = $HTTP_SESSION_VARS["username"];
        start_page("$user's home page");

}

Now the problem is, that although it auth's ok, and username and auth seem
to be set, anytime i try to access $HTTP_SESSION_VARS["username"] it is
blank.

Also if i try to use $HTTP_SESSION_VARS["username"] directly in a string i
get and error about expecting one of a variety of string types.

Sorry if this is a really dumb question.

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>