Location: PHPKode > projects > The Referral Database > referralsdb/logout.php
<?php

// include function files for this application
require_once("referrals_fns.php"); 
session_start();
header("Cache-control: private");

$admin_user = $_SESSION['admin_user'];

// Wait to start header or else logout link will display

if (!check_admin_user()) 
{

  // start output html
  do_html_header("Logging Out");

  // if they weren't logged in but came to this page somehow
  echo "You were not logged in, so you have not been logged out.<br>";
  echo "<hr>";
  do_html_footer();
}
else
{
   // if they were logged in and are now logged out
   unset($_SESSION['admin_user']);
   session_destroy();

   // start output html
   do_html_header("Logging Out");

   echo "Logged out.<br>";
   echo "<BR>";
   do_html_footer();
}


?>
Return current item: The Referral Database