I need help with this little time function. After thirty minutes, I want an echo to occur...
[PHP]
$_SESSION['idlemin']=date(i); //This makes the session update each time the page is refreshed but was defined on log in.
$minutes=date(i ); //Current
if ($_SESSION['idlemin']>=$minutes+30 ) {
echo "Your time is up!";
}
[/PHP]
Now, I know this doesn't work for obvious reasons...
Say you logged in at 14:49 well, it would have to equal 14:79 to work and well, time isn't calculated that high so I need something that can spill over hours..
[PHP]
$_SESSION['idlemin']=date(i); //This makes the session update each time the page is refreshed but was defined on log in.
$minutes=date(i ); //Current
if ($_SESSION['idlemin']>=$minutes+30 ) {
echo "Your time is up!";
}
[/PHP]
Now, I know this doesn't work for obvious reasons...
Say you logged in at 14:49 well, it would have to equal 14:79 to work and well, time isn't calculated that high so I need something that can spill over hours..
Comment