RE: [PHP] Session questions
| From: | VFSA-eRentals | Date: | Mon, 16 Jul 2001 06:23:30 +0000 |
| Subject: | RE: [PHP] Session questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-58017@lists.php.net to get a copy of this message | ||
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@bigpond.com]
Sent: Monday, July 16, 2001 6:14 PM
To: php-general@lists.php.net
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@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net