I\'m trying to stop/disable the back button functionality of the browser when a user logs out of my CodeIgniter (PHP) app. But, I think the browser is caching the page so it
My solution for this problem:
If the cookie is not set will redirected to the login page.
if(isset($_COOKIE['ci_session'])){
$user= $this->security->xss_clean($this->input->post('user'));
$pass= $this->security->xss_clean($this->input->post('pass'));
$result = $usrLog->loguearUsuario($user, $pass);
if($result == TRUE){
$data = $this->session->set_userdata('logged_in', $sessArray);
$this->load->view('pages/admin', $data);
}
}else{
header('Location: login');
}
I hope you learn! And sorry for my english! :-)