Jump to content

[SOLVED] Last Login


kinks

Recommended Posts

Whenever you login update a column for `last_login` to the current date/time.  You'll have to first decide what you're using to store dates and times in.  Will you use a timestamp?  datetime?  Whatever you're using, update the field using NOW() or whatever's appropriate.  Now, you've got when the login occurred, which you can grab the next time you login (remember to grab the data as a variable BEFORE you update it, so you can display it).

Link to comment
https://forums.phpfreaks.com/topic/172509-solved-last-login/#findComment-909444
Share on other sites

Whenever you login update a column for `last_login` to the current date/time.  You'll have to first decide what you're using to store dates and times in.  Will you use a timestamp?  datetime?  Whatever you're using, update the field using NOW() or whatever's appropriate.  Now, you've got when the login occurred, which you can grab the next time you login (remember to grab the data as a variable BEFORE you update it, so you can display it).

 

Thank you!

Link to comment
https://forums.phpfreaks.com/topic/172509-solved-last-login/#findComment-909520
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.