[eluser]Keloo[/eluser]
I'm currently working on a project and suddenly I'm getting this "404 page not found" error, when I'm trying to logout or to access the cart page.
Here is part of the code :
Code:
function validate_credentials()
{
$this->load->model('users_model');
$query = $this->users_model->validate();
if($query) // if the user's credentials validated...
{
$data = array(
'username' => $this->input->post('username'),
'is_logged_in' => true
);
$this->session->set_userdata($data);
redirect('site/index');
}
else // incorrect username or password
{
$this->index();
}
}
function logout()
{
$this->session->sess_destroy();
$this->index();
redirect('site/index');
}
function cart() {
$data['main_content'] = 'cart';
$this->load->view('includes/template',$data);
$this->is_logged_in();
}
Everything was fine until a few days ago, and now I cannot logout of the site, or access the cart section.
I think something is wrong with the sessions, but I'm not sure. I hope someone can give me a hint.