title: CodeIgniter Cookies Working In FF, But Not Chrome Or IE
body: <p>I've built a site in CI, and have a login system, which works fine in Firefox but not Chrome or IE. In those two if the username and password are correct it just redirects (i think) back to the login page, not to the login error page, or to the site home (as it should). I've noticed that it doesn't seem to be setting a cookie in Chrome, but it does in FF.</p>
  
  <p>Here's the code in my controller which sets the cookie and redirects after authentication:</p>
  
  <pre><code>            $newdata = array(
                     'username'  =&gt; $_POST['login_username'],
                     'real_name' =&gt; $name,
                     'user_id' =&gt; $uid,
                     'logged_in' =&gt; TRUE
                 );
  
              $this-&gt;session-&gt;set_userdata($newdata);
              //echo $newdata;
                  redirect('/site/index');    
  </code></pre>
  
  <p>Any ideas why this might be happening?</p>
  
  <p>Thanks</p>