Welcome Guest, Not a member yet? Register   Sign In
lost session in IE browser
#11

[eluser]CI_expert_indian[/eluser]
public function login_check()
{
$this->load->model('login_check_model');
$username = $this->input->post('username');
$password = md5($this->input->post('password'));
$data= $this->login_check_model->check_login_credentials($username,$password);
if($data>0)
{
$this->load->view('header');
$session_data=array('username' => $username ,'password'=>$password,'authen_user'=>'1');
$this->session->set_userdata($session_data);
$session_id = $this->session->userdata('session_id');
$save_session_id= $this->login_check_model->save_session_id($username,$password,$session_id);
$this->load->view("xxxx");
}
else
{
$this->session->set_flashdata('login_validate_msg', 'Please enter valid username and password');
redirect('admin/index',"refresh");
}
}



This is my code ...i initialize session from here but when i redirect to page xxx i lost my user_data ????
#12

[eluser]boltsabre[/eluser]
Did you actually change the session/cookie name in the config file and remove the underscore?

On a little security note, you should change it to something obscure, just having "ci_session", "cicookie", "cisession" or some other such name is instantly letting every hacker out there know that you are using PHP on the CI framework - my motto is to keep them guessing as long as possible!
#13

[eluser]CI_expert_indian[/eluser]
Now Fixed !!!!!!!!!!!!!!!!!! Smile My server time was diffrent than the orginal time due to that my session expires within seconds ..... no i set expiration time to 0 and it working like a IRONMAN Sad

Thanks everybody for your support :::::::::




Theme © iAndrew 2016 - Forum software by © MyBB