Hi friends,
I am working with redhat 6 , mysql 3.23 and php 3.0.16. I have a big problem with my logout page. Imagine a user
sending your login and passwd and going to a restrict area and after check the news he tries to use the button logout ,
but the script doesn't work correctly. When the user use the back button in the Netscape or I.E , he is able to go back
to the user login area. What I am thinking about , if the user tries to use the back button he need go to the login
area again to type his login and password. I am sending the two pages, login.php3 and logout.php3. If anyone has any idea how
can I fix it , I thank you in advanced.
Login.php3
<? setcookie("Cookieuser",$user,time()+28800); ?>
<?
mysql_connect (host,user,passwd);
mysql_select_db (mydb);
$result=mysql_query("select user,passwd from log_db where user='$user'");
if (isset($user)) {
echo "Hello, $user";
echo "<a href=logout.php3>logout</a>";
}
?>
Logout.php3
<?
SetCookie("Cookielogin",$login);
header("Pragma: no-cache"); // http 1.0
header("Cache-Control: no-cache, must-revalidate"); // http 1.1
header("Location:http://www.webagro.com.br/logout.html");
header("Expires: 0");
?>