Page 1 of 1

Can you help me with this PHP problem?

Posted: Fri Apr 06, 2012 3:38 am
by Michal00
Hi I developed a website and i also create login session in my website by using PHP and MySQL... but now i want to know that how can i add a feature which will print "online" if that user is online or print "offline" if that user is offline....Please help me.

Re: Can you help me with this PHP problem?

Posted: Fri Apr 06, 2012 6:27 am
by Celauran
Are you storing user sessions in the database?

Re: Can you help me with this PHP problem?

Posted: Tue Apr 17, 2012 1:58 pm
by x_mutatis_mutandis_x
Need not store the sessions per say, but just the sessionId. Use that to track the login activity in a table
Following could be your columns in the table:
session_id
login_date
logout_date
username
ip_address