Login   Register  
PHP Classes
elePHPant
Icontem

File: logout.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of raja  >  Login and DB classes quick start  >  logout.php  >  Download  
File: logout.php
Role: Auxiliary script
Content type: text/plain
Description: Simple logout (Session Destroy)
Class: Login and DB classes quick start
Authenticate users with records in MySQL database
Author: By
Last change:
Date: 6 years ago
Size: 470 bytes
 

Contents

Class file image Download
<?php
session_start
();
if(isset(
$_SESSION['agentEmail']))
{
 
$uname=$_SESSION['agentEmail'];
 
$s_uid=$_SESSION['UserId'];
// $sql_online = "update users set online=0 where userid='$s_uid'";
// $res_online = mysql_query($sql_online);
 
session_destroy();
 
$message="you are loggedout successfully.";
 
header("Location: index.php?msg=$message");
}
else{
session_destroy();
 
$message="Please Login First !";
 
header("Location: index.php?msg=$message");
}
?>