Hello, i am new to the zf and a bit confused about using the session objects.
I am using the session component but not within an MVC environment.

In my bootstrap i have:

Zend_Session::start();
Zend_Session::setOptions(array('strict' => 'true'));

which is the first thing included by every page. In my login page i have
this:

//if db credentials are ok
$loginNamespace = new Zend_Session_Namespace('login');
$loginNamespace->loginUserID = $userId;
$loginNamespace->loginUserPassword = $userPassword;
$loginNamespace->loginType = $loginType;
$loginNamespace->lock();

now after the user has logged in, i am trying to check the session
credentials on another page:
//after bootstrap has been included
$loginSessionNamespace = Zend_Session::namespaceGet('login');
        foreach($loginSessionNamespace as $key => $val){
                echo "$key is $val<br />";
        }
but no values are being printed. If i print_r($loginSessionNamespace ) i
get:

Array ( [loginType] => ) loginType is 

...??? Can someone just double check that i am using the session objects in
the correct way?

-- 
View this message in context: 
http://www.nabble.com/Basic-session-usage---namespace-not-storing-variables-tp18485701p18485701.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to