title: how to use PHP session variable in zend framework
body: <p>I want to know how to use PHP session variable in zend framework</p>
  
  <p>here is my code so far :-</p>
  
  <pre><code> public function loginAction()
      {
          $this-&gt;view-&gt;title = 'Login';
          if(Zend_Auth::getInstance()-&gt;hasIdentity()){
              $this-&gt;_redirect('index/index');
          }
  
              $request = $this-&gt;getRequest();
              $form = new Default_Form_LoginForm();
              if($request-&gt;isPost()){
              if($form-&gt;isValid($this-&gt;_request-&gt;getPost())){
                  $authAdapter = $this-&gt;getAuthAdapter();
  
                  $username = $form-&gt;getValue('username');
                  $password = $form-&gt;getValue('password');
  
                  $authAdapter-&gt;setIdentity($username)
                              -&gt;setCredential($password);
  
                  $auth = Zend_Auth::getInstance();
                  $result = $auth-&gt;authenticate($authAdapter);
  
                  if($result-&gt;isValid()){
                      $identity = $authAdapter-&gt;getResultRowObject();
  
          print_r($authAdapter-&gt;getResultRowObject());
  
                      $authStorage = $auth-&gt;getStorage();
                      $authStorage-&gt;write($identity);
  
          echo $authAdapter-&gt;getIdentity() . "\n\n";
  
             //         $this-&gt;_redirect('index/index');
                  } else {
                      $this-&gt;view-&gt;errorMessage = "User name or password is wrong.";
                  }
              }
          }
  
  
          $this-&gt;view-&gt;form = $form;
  
       }
  </code></pre>
  
  <p>now i want to store username in session and i want to use in some other page like </p>
  
  <p><code>echo "welcome," .$this-&gt;username;</code>  what i can do ?</p>