
<a href="/login.php?accesscheck=<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>">Login</a>
for the logout link, use:
<a href="/logout.php?accesscheck=<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>">Login</a>
on the login page, make sure the action of the form uses the following code:
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".htmlspecialchars($_SERVER["QUERY_STRING"]):""; ?>"
on the logout page, add an access restriction to restrict access to only allow logged in users, make sure the access restriction code is after the clear session code on the logout page.
that should do the trick.

Hello Jason,
I have inserted the code as instructed and ensured the restrictions applied to the Log Out Page came after the Session Code. The problem arises when you are not logged on but click on the Logout link and expected to be redirected to a page selected in Manage Page Access, instead I get an error out captured in the image attached.
What do I do?
Thanks for your help.
