During the user logout time we must destroy the session, for stop any invalid user access:
sample code:
<?php
header("location:login.php");
session_start();
unset($_SESSION['admin']);
session_unset();
session_destroy();
$_SESSION['admin']="out";
?>
sample code:
<?php
header("location:login.php");
session_start();
unset($_SESSION['admin']);
session_unset();
session_destroy();
$_SESSION['admin']="out";
?>
0 comments:
Post a Comment