Last active
June 8, 2018 17:17
-
-
Save moaalaa/3e30fbf0c165e1264da73d51ddc54cb6 to your computer and use it in GitHub Desktop.
best and more effectively logout page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); // if you start it already no need for it | |
session_unset(); // unset all session variables | |
session_destroy(); // destroy the session completely | |
session_write_close(); // close the session write | |
setcookie(session_name(),'',0,'/'); | |
session_regenerate_id(true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment