title: Get session value without page refresh php
body: <p>I am working on app. Where I set some session value using ajax call. Later on without page changing I call another method where I use the session but it didn't work. I am calling both functions using ajax. First Ii call set method while after that I call get, but on get I didn't get the session value. What can cause be?</p>
  
  <pre><code>   public function getmysession()
     {
         if($_SESSION['mahmood']=='getit'){ echo "this is set session";}
     }
  
  
     public function setmysesion()
     {
         $_SESSION['mahmood'] = 'getit';
     }
  </code></pre>