PHP Classes

session destroy dont work!

Recommend this page to a friend!

      Simple Session (PDO / MySQL)  >  All threads  >  session destroy dont work!  >  (Un) Subscribe thread alerts  
Subject:session destroy dont work!
Summary:session_destroy() is not work
Messages:1
Author:shahriyar
Date:2014-05-20 08:13:14
 

  1. session destroy dont work!   Reply   Report abuse  
Picture of shahriyar shahriyar - 2014-05-20 08:13:14
hi dear,
this is my code
<?php
ob_start();
require_once '../inc/class_session.inc.php';
$session = new Session();
if(!isset($_SESSION['admin']) OR !isset($_SESSION['userid'])){
unset($_SESSION['admin']);
unset($_SESSION['userid']);
session_destroy();
session_unset();
header('location: index.php');
exit();
}

All sessions found in the database is not deleted
What command to clear the session from the database should be used?
i tested with firefox and chrome