title: Flash Messages with CI_Sessions
body: <p>I am having trouble with Flash Messages when <code>$config['sess_use_database']</code> is <code>TRUE</code>. Whenever, it is <code>FALSE</code> it works without any problems. Below is my code and my configuration file. Why does it not work when I try to store the sessions in the database?</p>
  
  <p><strong>Configuration File</strong></p>
  
  <pre><code>$config['sess_cookie_name']     = 'ci_session';
  $config['sess_expiration']      = 7200;
  $config['sess_expire_on_close'] = FALSE;
  $config['sess_encrypt_cookie']  = FALSE;
  $config['sess_use_database']    = TRUE;
  $config['sess_table_name']      = 'ci_sessions';
  $config['sess_match_ip']        = FALSE;
  $config['sess_match_useragent'] = TRUE;
  $config['sess_time_to_update']  = 300;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code> $this-&gt;session-&gt;set_flashdata('item', array('message' =&gt; 'Record created successfully','class' =&gt; 'success'));
   redirect('dashboard');
  </code></pre>
  
  <p><strong>Dashboard View</strong></p>
  
  <pre><code>if(!empty($this-&gt;session-&gt;flashdata('item'))) {
    $message = $this-&gt;session-&gt;flashdata('item');
    echo "&lt;div class='" . $message['class'] . "&gt;" . $message['message'] . "&lt;/div&gt;";
  }
  </code></pre>