Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6734927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:56:51+00:00 2026-05-26T10:56:51+00:00

I am working on a quite simple custom made content management system (CMS). There

  • 0

I am working on a quite simple custom made content management system (CMS). There is a database table containing usernames, passwords, emailaddresses and a date/time field showing when the user logged in for the last time (I used “NOW()” in the query when updating).

When an user successfully logs in, the script will update a table in the database and sets the new time (using NOW()).

Now I would like to show which users are currently logged in, in the past 5 or 10 minutes. I have no idea how to accomplish this, therefore I am calling for your help. On the internet I read I need to do this with a timestamp, but I have no idea how this works.

  1. I need to know how to set a specific timestamp.

  2. I need to know how I can check in PHP if the user has been logged in in the past 5 or 10 minutes so I can display their names somewhere.

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:56:52+00:00Added an answer on May 26, 2026 at 10:56 am

    1.
    Why do you need to set a custom timestamp? Using NOW() is all you need.

    2. This query will find all users where the column latest_login is in the past 10 minutes:

    SELECT * FROM users WHERE latest_login >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a quite simple Webpage (MVC2), using localisation based on Resource Files.
My problem seems to be quite simple, but it's not working the intuitive way.
I am refurbishing a big CMS that I have been working on for quite
I'm working on a quite simple native extension for Adobe Air powered iOS app.
OK my problem is quite simple Im about to start working with a team
I'm trying to layout a simple three-column header, but something's not working quite right.
I am using the code snippet below, however it's not working quite as I
I'm working on quite complicated project, in terms of business-logic quantity and quantity of
I am working on quite a large DB based project and I like the
I've been working for quite a while now with LINQ. However, it remains a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.