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' ) ; ?>
Share To Facebook | Tweet This