Jump to content
Larry Ullman's Book Forums

Chapter 18 Add A Last_Login Field (Solution) Anyone?


Recommended Posts

Assuming you have the last_login field being properly updated in the DB, you can compare that value to the current time.

The following is a good, simple way to calculate the difference between the two:

http://stackoverflow.com/questions/676824/how-to-calculate-the-difference-between-two-dates-using-php

 

(Both Emil H and jurka provide good answers in the SO post above.)

Link to comment
Share on other sites

 Share

×
×
  • Create New...