Apply for Zend Framework Certification Training

Zend Framework 1




$loginsession = new Zend_Session_Namespace('valid_login');
$loginsession->login_username = $this->_getParam('username'); 

 To assign Value in Session

$sess = new Zend_Session_Namespace(’MyNamespace’);
$sess->username = ‘you_name’;

To Retrieve value of Session

$session = new Zend_Session_Namespace(’MyNamespace’);
$userName = $session->username;

To check validity of Session

If (Zend_Session::sessionExist()) {

    // do something.

}

To completely logout you will need to do the following

Zend_Session::destroy(true);                                    

< Application ini configuration for Zend framework 1 Database How to pass value from Controller to View in Zend framework 1 >



Ask a question



  • Question:
    {{questionlistdata.blog_question_description}}
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question


Back to Top