$ua=getBrowser(); $ip=get_client_ip_env(); if($_SESSION["LAST_ACTIVITY"]==''){ $dbobj->insert("insert into visitor_history(VH_IPAddress,VH_Date,VH_Browser) values ('".$ip."','".date("Y-m-d H:i:s")."','".$ua['name']."')"); } if (isset($_SESSION["LAST_ACTIVITY"]) && ((time() - $_SESSION["LAST_ACTIVITY"]) > 60)) { //session_destroy(); //session_unset(); unset($_SESSION['LAST_ACTIVITY']); } $_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp ?> Inside I