PHP Simple Logout Script

This is quietly simply logout script for your member that already login, by using php session_destroy function if you start login processed with session_start. Of course you can adding more function after session_destroy.

Here are the basic simply code, write and save as php file (ie; logout.php):

<?php
session_start();
session_destroy();
?>


Want adding some message or redirect you can adding after session_destroy.
Message After Logout:

<?php
session_start();
session_destroy();
echo "put whatever your message here, you can using html code here";
?>

Redirect After Logout:

<?php
session_start();
session_destroy();
//you can change index.php with any url
header( 'Location: index.php' ) ;
?>

Related posts:

  1. Currency Exchange Free PHP Script
  2. Simple PHP Password Generator
  3. Quick And Easy Way To See The Destination of URL Shortener Without Opening It
  4. PHP Include Function Error, How To Fixed That?
  5. Problem Solving: Images Not Showing In Virtuemart


Share To Facebook | Tweet This