Hi Frnds.,
How to find the users login/logout times on my site.
can Anyone help me to solve this problem.
Thank You.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nitesh KejriwalPosted Sep 5, 2014, 1:25 AM
UserID int
LogInTime datetime
LogOutTime datetime
Whenever user logs in, you need to enter a record in the table with LogInTime. When the user logs out, before logging him out, find the last record of the logged in user and update LogOutTime to current time.
However, this is not the best way as many users login to a website and close the browser after some time. If you want to implement some specific feature based on this, you must think an alternative solution as well.
Saineshwar BageriPosted Sep 5, 2014, 12:16 AM