Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- session_name('tzLogin');
- // Starting the session
- session_set_cookie_params(2*7*24*60*60);
- // Making the cookie live for 2 weeks
- session_start();
- if($_SESSION['id'] && !isset($_COOKIE['tzRemember']) && !$_SESSION['rememberMe'])
- {
- // If you are logged in, but you don't have the tzRemember cookie (browser restart)
- // and you have not checked the rememberMe checkbox:
- $_SESSION = array();
- session_destroy();
- // Destroy the session
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement