I have seen the following question and tried to adapt part of the answer but to no luck: \'How can i disable the back browser button after user press logout and destroy session?
login page:
checkUser($Username,$Password,$User_Type);
if ($rowsCount!=0)
{
$_SESSION['user'] = $Username;
header("Location:LoginViewController.php");
} else {
echo 'Bad user';
}
} else {
echo 'Please, fill all inputs';
}
} else {
echo 'Bad form sent';
}
?>
LoginViewController.php :
And add the headers to force the browser to revalidate the pages :
logout.php :