PHP and SQL Social Networking - User Online

CtL

New Member
I want to set up online detection on my website.I have a row in my user table where the last login datetime is stored. Every time a user visits the site, his login date updates and user online row sets to 1 (1 - online, 0 - offline).How to change the online row to 0 (offline) if the last login was 10 or more minutes ago? The aim is to find difference between dates.
 
Back
Top