I have not been coding in a while so I am a bit foggy on some areas and some basic knowledge seems to have escaped me.....good sign I need to keep up on practising....
Nonetheless I have a problem that I have not been able to address properly.
Situation:
When the user logs in the DB is updated with the DATETIME they log in (2005-09-22 11:30:08) as well everypage they visit and the time they visit that page ($lastpagetime).
What I want to do is automatically log them off if they have been idle on a certain page for a certain amount of time. I was thinking something like 15 minutes.
So what I want to do is set $expiretime = $lastpagetime+15 minutes and if the $expiretime = the current DATETIME then they would automatically be logged out.
However $expiretime has to be updated on each page just like the $lastpagetime already is.
Does any of this make sense?
I realise the answer is probably a simple one that is right in front of me; yet I still am managing to overlook it.
Thanks,
Jay