basically I have a datetime field in a DB using
date('Y-m-d H:i:s');
basically i need:
$time = $timefromdb;
$expiretime = date('Y-m-d H:i:s'); (- 2 minutes)
what i want to do is check if a user is still active with a time of 2 minutes. So if the user hasnt updated the DB in the last 2 minutes it will remove them from the list.
so i need to conpare
if($time < $expiretime)
but not sure how to get that $expiretime value as I need it.
I looked in manual for time() and mktime() but could not really understand it 😐 just cant get my head around it
thanks in advance