Hi!
Whenever I close the browser without logout, the session stays as it was before.Is there any way out to automatically destroy session after some time??
I found the following code on internet but cudnt understand what is $_SESSION['last_seen']
Code:<?php session_start(); if(isset($_SESSION['last_seen']) && (time() - $_SESSION['last_seen']) > 1800) { session_destroy(); } else { $_SESSION['last_seen'] = time(); } ?>









Bookmarks