Session variable problems

A

Anonymous

Guest
I need to create login and I can't set a session variable for it. I'm using the following code:
$objU = new COM ("Deans_Project.User");
$objU->CheckPassword ($login, $password);
session_register ("lgnrights");
$lgnrights = $objU->rights;
$objU = null;
When I check in this file the variable value by line
echo $lgnrights;
the value is correct. But when I try to check this variable value in another file by lines
session_register ("lgnrights");
if (!isset ($lgnrights))
$lgnrights = 0;
echo $lgnrights;
the result is zero so the session variable doesn't set. Another session variables works correctly but this one doesn't so I can't understand the reason. Tell me please why it can be.
 
Back
Top