I have created a login system in codeigniter project, which is working fine in Firefox but doesn't work in Chrome, data fetch and set for session but when this code redirect control to admin/dashboard, there we check session data again. If session data not exist then the code will redirect user to login again............ My code is below, and i don't know what is wrong with this session/cookies in codeigniter.?
$data = array(
'user_id' => $user->id,
'name' => $user->name,
'user_type' => $user->type,
'username' => $user->username,
'is_logged_in' => true
);
$this->session->set_userdata($data);
//echo "user ".$this->session->userdata("username"); exit;
redirect("admin/dashboard", "location");
I have search alot for but no one work in this situation, like a change "cookie_domain" in config file but nothing happened....