[eluser]hahacc[/eluser]
$session_data = array('admin'=>$this->input->post("username"));
$this->session->set_userdata($session_data);
$username=$this->session->userdata(admin);//get the username
There is not a problem in the above code,but when I wanna to get the value of admin with JavaScript method,problem starts to ache my head:
a=get_cookie('admin');//Why nothing?
Why I get the cookie with native CI method,but nothing with the JS method?
PS:I'm not using a database to store the session data.
Thanks for sharing me with this problem.