How to calculate "Last login date/time"
Posted: Thu Nov 19, 2009 8:28 pm
Hi,
I have made a simple member script. I would like to add "Last login date" to my script. I am at the moment using gmdate() function to get the current date.
I was thinking instate of just displaying the last login date from the database, i guess people would prefer if i could tell them that "Last login today or last login yesterday or last login 17th Nov, 2009"
Does any one knows how to subtract current date from the "last login date" to calculate how many days ago the user last logged in?
I am doing this for the first time, I could as well be wrong in my whole thinking....!
Thank you,
I have made a simple member script. I would like to add "Last login date" to my script. I am at the moment using gmdate() function to get the current date.
I was thinking instate of just displaying the last login date from the database, i guess people would prefer if i could tell them that "Last login today or last login yesterday or last login 17th Nov, 2009"
Does any one knows how to subtract current date from the "last login date" to calculate how many days ago the user last logged in?
I am doing this for the first time, I could as well be wrong in my whole thinking....!
Thank you,