hi again, i'm coming into another situation...
Unregistering Session Variables and Destroying a Session
i tried tis in my index.php
<?php
// start the session
session_start();
header("Cache-control: private"); //IE 6 Fix
$_SESSION['user_name'] = false;
if($_SESSION['user_name']){
echo "session registered";
}
else
{
echo "ok, session is not registered";
echo "<a href=http://www.urcompany.com/login.php>Login</a>";
}
?>
<? echo $_SESSION['user_name']; ?>
i don't understand the purpose of this....i thought it would not allow me to go into my member's page without going directly from the login....if i cut and paste the member's link...i can go there without having to go from my login.php.
Destroying a session.... do I add this to my index.php too?
<?php
// start the session
session_start();
header("Cache-control: private"); //IE 6 Fix
$_SESSION = array();
session_destroy();
echo "Destroy This Session";
if($_SESSION['user_name']){
echo "The session is still active";
} else {
echo "Ok, the session is no longer active! <br />";
echo "<a href=http://www.urcompany.com/login.php>Login</a>";
}
?>
and add tis code to my logout.php ...???
<?
session_start();
$_SESSION = array();
session_destroy();
?>