session_destroy
Posted: Thu Jan 20, 2011 1:30 pm
I used the above code in my index.php
and I have another file logout.php
but even after loggin out I can still access index.php. Why???
Code: Select all
<?php
session_start();
if(!isset($_SESSION['login']))
{
header("Location: login.php");
}
//rest code
?>Code: Select all
<?php
session_unset();
session_destroy();
header("Location:login.php");
?>