Search This Blog

Friday, August 17, 2012

Session Start & Close in PHP

Put this code on all the pages in admin for start a session....

<?php

session_start();
if(!isset($_SESSION['login_user'])){
    header("Location:../admin/index.php");
}

?>

use this code to unset or destroy the session..

unset($_SESSION['login_user']);

For more information checkout our official website.



No comments:

Post a Comment