If I click logout link, it will be directed me to the 'logout' function that will destroy the login session. After that I logged in again that directed me to the 'products' function. But if I click back button it will directed me to the 'logout' function, and destroyed login session without clicking the logout link.
logout function->products function->back to the logout by clicking the back button->login session destroyed.
function logout(){
$array_items = array('is_logged_in' => FALSE);
$this->session->unset_userdata($array_items);
$this->products();
}
how can I prevent the page to back to the 'logout' ? if it was possible, I would like to reload the current page rather than just prevent the page to go back.
Thank You so much for your help, and to share you knowledge. Sorry for my bad explanation