Code: Select all
<?php
// This blurb starts the session for the users.
session_start();
header("Cache-control: private"); // Fix for ie6
?>
<?php include 'headermem.php'; ?>
<center><font color=white> Are you sure you want to logout?</font></center><br>
<center><a href=/index.php>Yes</a> | <?php unset($_SESSION['username']); session_destroy();
?>
<a href=javascript:history.back()>No</a>"; }
<?php include 'footermem.php'; ?>you click on no it brings you back to the page you were at before, you click yes and it brings you back to the index.php logging you off,
this is what i need it to do ! it does it all, even logs the people out , but the problem is , right when you click on the initial link to get to the log out page, it logs you out, you dont even have to click on yes, so if someone clicks on the logout link from any other page lets say by mistake it logs you out! how do i stop it from logging you out right away and only log you out when you click yes?
any ideas?
Thank you
Elaine