Welcome Guest, Not a member yet? Register   Sign In
Cookies not keeping their values
#2

[eluser]InsiteFX[/eluser]
1) Check to make sure that your time is correct.

2) Cookie name:
Code:
$config['sess_cookie_name'] = 'unigue';  // do not use session.

3) Each cookie should have it's own name.

4) You do not need two cookies, you can store and array or json in a cookie.
Code:
$data = array(
    'rmemail' => $email,
    'rmpswd'  => $password
);

// Set Cookie
setcookie('rememberme', serialize($data), time() + 31536000);
setcookie('rememberme', json_encode($data), time() + 31536000);

// Retrive Cookie
$data = unserialize($this->input->cookie('rememberme'));
$data = json_decode($this->input->cookie('rememberme'));


Messages In This Thread
Cookies not keeping their values - by El Forum - 08-17-2012, 02:21 PM
Cookies not keeping their values - by El Forum - 08-18-2012, 12:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB