I’ve two logout.php pages with session. 1 is for user panel and other is admin panel. So that I used following code to sign out.
For Admin logout.
<?php
include("include/session.php");
include("db.php");
unset($_SESSION['uname_ad']);
?>
For user logout
<?php
include("include/session.php");
include("db.php");
unset($_SESSION['uname']);
?>
So is it secure sign out with PHP?
I’d destroy the entire session…
session_destroy();