title: Codeigniter Session Data not available in other pages after login
body: <p>So, I have set up a login page that verifies the user's credentials, and then sets codeigniter session data 'email' and 'is_logged_in' and a few other items. The first page after the login, the data is accessible. After that page, I can no longer access the session data. In fact, if I try reloading that first page, the session data is gone.</p>
  
  <p>I have tried storing it in the database, storing it unencrypted (bad idea I know, but it was for troubleshooting), and storing it encrypted. I have autoloaded the session library in config.php. </p>
  
  <p>Here's an example of the code I'm using to set the session data:</p>
  
  <pre><code>$data = array(
                      'email' =&gt; $this-&gt;input-&gt;post('username'),
                      'is_logged_in' =&gt; true 
                  );
                  $this-&gt;session-&gt;set_userdata($data);
  </code></pre>
  
  <p>And to retrieve it, I'm using :</p>
  
  <pre><code>$this-&gt;session-&gt;userdata('email');
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>$this-&gt;session-&gt;userdata('is_logged_in');
  </code></pre>
  
  <p>I've done lots of work with PHP and cookies, and sessions before, but this is my first project with Codeigniter and I'm perplexed.</p>
  
  <p>Could it have something to do with directory issues? I have the login page and process controlled by a 'login' controller, and then it redirects to a 'site' controller. </p>
  
  <p>Thanks for your help, and please let me know if I need to clarify anything.</p>