Forum Moderators: coopster
My problem is now that I want to tell the difference between the two times, the last stored time and the current time, and if it's greater than 20 minutes, to show the user as logged out.
Here are the problems I run into, if the difference is less than 20 minutes but the difference between the two days is more than 1, I don't want to show the user as logged in, obviously.
I have the times currently stored in the strtotime() fashion.
Here's an example:
$lasttime = strtotime("-67 minutes"); // for instance
$currentdate = strtotime("now");
$lastact = date("Y-m-d g:i:s a", $lasttime);
$now = date("Y-m-d g:i:s a", $currentdate);
$daycheck = date("d", $now) - date("d", $lastact);
$minutecheck = date("i", $now) - date("i", $lastact);
If anyone can help me out, I would appreciate it.