[eluser]helloworld7[/eluser]
I tried two ways.
1) $cookie = array('name' => 'sual', 'value' => 'test', 'expire' => time()+3600,
'domain' => '.somedomain.com', 'path' => '/', 'secure' => TRUE);
$this->input->set_cookie($cookie);
on a controller (A) then redirect to another controller (B)
2) setcookie("TestCookie", 1, time()+3600);
on a controller (A) then redirect to another controller (B)
Then controller (B) just print_r($_COOKIE);
Both ways always just print out only PHPSESSIONID like this.
Array ( [PHPSESSID] => lqcorhnpisl842fk0mrqpkist0 )
And I keep hitting refresh on B and there's only the id.
Should these from config.php matters? I just keep it as the default.
$config['cookie_prefix'] = "";
$config['cookie_domain'] = "";
$config['cookie_path'] = "/";
$config['cookie_secure'] = FALSE;
I don't know what else to check. Hope anyone can help me on this. Thanks.