I have a table of datetime fields. We already have a max 20 minute limit to be logged in before it kicks you out of the system. We use the following code for that:
[code=php]session_cache_expire( 20 );
session_start(); // NEVER FORGET TO START THE <strong class=”highlight”>SESSION</strong>!!!
$inactive = 1200;
if(isset($_SESSION[‘start’]) ) {
$session_life = time() – $_SESSION[‘start’];
if($session_life > $inactive){
header(“Location: ../logout.php”);
}
}
$_SESSION[‘start’] = time();
But When they log in, I store the next batch processing date and time from that datetime table into a SESSION variable called $_SESSION[‘procdate’].
I want to see if the time remaining UNTIL $_SESSION[‘procdate’] is less than our default 20 minutes. If so, then force them to log out when they reach the $
$_SESSION[‘procdate’] is a UNIXTIMESTAMP.
If its possible, I’d like to display an alert or popup or activate a JQuery popup when there is 5 minutes remaining.