Hello,
I have two files:
login.php
<?
session_start();
header("Cache-Control: no-store, no-cache, must-revalidate");
global $valid_user;
$username = trim($_POST["username"]);
$password = trim($_POST["password"]);
if ((!empty($username)) && (!empty($password)))
{
//checks if this user exists
}
if (this user exists)
{
session_register("valid_user"); $_SESSION["valid_user"]=$username;
}
else
{
?>
<html>
<body>
<form action="login.php" method="POST">
<input type="text" name="username" size=10 maxlength=10>
<input type="password" name="password" size=10 maxlength=10>
<input type="submit" value="OK">
</form>
</body>
</html>
<?
}
?>
logout.php
session_start();
header("Cache-Control: no-store, no-cache, must-revalidate");
global $valid_user;
if (session_is_registered("valid_user"))
{
session_unregister("valid_user");
session_destroy();
}
The problem is that if I press "Back" button after logout.php execution IE returns me back to the page I've logout.
Pls, help me. I don't know what to do...