I need to build a php session expiry alert / stay logged in prompt for my website. I have looked at dozens of examples but am confused so back to basics.
Is there a way to display a countdown for the default expiry time?
UPDATE 1
So far - to get a handle on the situation - I have:
echo '<p>This is the $_SESSION[\'expiretime\']: ' . $_SESSION['expiretime'] . '</p>';
echo '<p>This is the time(): ' . time() . '</p>';
$timeleft = time() - $_SESSION['expiretime'];
echo '<p>This is the time() MINUS the $_SESSION[\'expiretime\'] : ' . $timeleft . '</p>';
I'm not certain what the parameter $_SESSION['expiretime'] is but I found it in a thread and it looked interesting. Other than the number of seconds since 1970 I'm not sure what all of this tells me but may be useful for subsequent calcs.