Logout

Fume

Junior Member
Members
2Posts:
2 Threads:
Dec 06Joined:
0 Reputation:
#1
Logout doesn't seem to be working.
When you press 'logout' it just refreshes the page and keeps you logged in.
Logout.php - 
Code:
<?php
    session_destroy();
    $_SESSION = array();
    header('Location: '.$config['hotelUrl'].'/index');
?>
Reply

Sicily94

Junior Member
Members
11Posts:
3 Threads:
Dec 10Joined:
0 Reputation:
#2
Hi @Fume, try with this but you have to modify with your path ...

Code:
<?php
require_once ('core.php');
session_destroy();
header("Location: $site");
?>
Jeunx likes this post
Reply

Jeunx

Junior Member
Members
16Posts:
1 Threads:
Nov 18Joined:
0 Reputation:
#3
PHP Code:
<?PHP
Include('Core.php'); // Include Core.php
Session_Start(); // Start Session
$_SESSION Null// Null Session
Session_Destroy(); // Destroy Session
Header('Location: '.$HotelUrl);Exit;

?>
Note: Code not tested
Note 2: If it fails, delete 'Session_Start ();'.
Reply
Users browsing this thread:
1 Guest(s)