title: How to dynamically add text box and retrieve the values in it
body: <p>I have created a log in page with session library,</p>
  
  <p>so my question is, how do i access the session after a user logs in when i link through web pages.</p>
  
  <p>do i have to use @session_start(); on every webpage i link? I am using  link. </p>
  
  <p>I have this controller after validating the log in details:</p>
  
  <pre><code>function verify_account()
      {
          $this-&gt;load-&gt;model('user_model');
          $query = $this-&gt;user_model-&gt;validate();
  
          if($query)
          {   
              $data = array(
              'username' =&gt; $this-&gt;input-&gt;post('username'),
              'is_logged_in' =&gt; true
              );
  
              $this-&gt;session-&gt;set_userdata($data);
              $data['main_content']= 'homepage';
              $this-&gt;load-&gt;view('includes/templates',$data);
          }
  
          else
          {   
              $this-&gt;index();
          }
      }
  </code></pre>
  
  <p>If my question wasn't clear enough, The problem is, after i logged in, the homepage displays which user i have logged on to but when i click a link,(Would need to go through a controller function first to load the templates) so how do i retrieve the recently created session and pass it on to the page i link?</p>
  
  <p>P.S. I cant ask any questions so im stuck to editing my posted questions. Posted block :(. sorry for inconvenience.</p>