AHMED SAMY
asked on
i cannot destroy session
i cannot destroy session
my code is:
logout.php
wow.php
my code is:
logout.php
<?php
session_start();
if(isset($_SESSION['username'])){
setcookie('furnlog','', time() - 3600);
session_destroy();
header("location:wow.php");
}
?>
wow.php
<?php
session_start();
require "admin/cookie_new.php";
?>
مرحبا <?php print_r($_SESSION['username']); ?>
<br><br>
<a class="nav-link" href="logout.php" target="_top">خروج</a>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
use this code in your logout.php page
session_start();
session_destroy();
It will work definitely
ASKER
thanks that's very good
Open in new window
Let me know if that helps.