• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session refresh issues

This is something that has been happening in some of my apps, specifically now it is a crucial thing.

I have a form, I create an account and login that person in on submit, then reload the page like so (sketchy):

function index()


if valid {
$this->load->view('template/pona', $data);

My sessions are set up like this:

$config['sess_cookie_name']        = 'ci_session';
$config['sess_expiration']        = 7200;
$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;

I made sure to echo my $data array to see what the state of my login was.

The problem: The first time I get back on the page, it doesn't register as logged in. If I hit F5, I suddenly get the variable in the session.

What. Gives. Tongue I have this more often when submitting data to the same page as it was submitted from.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.