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 6330233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:50:02+00:00 2026-05-24T17:50:02+00:00

When Login as a user with (example : ramesh) if same user same time

  • 0

When Login as a user with (example : ramesh) if same user same time can’t login

When User close the browser without logout then its should Auto logged out

i will update query as insert status=0 for logout and login status=1

mysql_query("update usermaster set Status=0 where Username='$user' and password='$pass' and Role='$role'");

I have problem need auto logout status change with 0 and if browser closed without logout then also should be update status with 0

  • 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-24T17:50:03+00:00Added an answer on May 24, 2026 at 5:50 pm

    Easier way to do that is by using timeout – when user access any page you set status = 1 and last_seen = NOW() and then you can try to assume that if last_seen is more than x time ago so that user leave your site. You can also use ajax to “ping” your server in background to make sure you don’t logout him when he is for instance writing long post or something like that.

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

Sidebar

Related Questions

I'm building four websites. They all should have the same login-datas (user can registrate
Should I write authentication logic in my forms for handling user login? For example,
Example: The user login to the webpage => Click on a button This action
I have 2 site: example.com and exampletwo.com I want that when a user login
For example, if I have a user model and I need to validate login
I'm looking to implement user login onto my site for the first time. I'm
Basically, I have a file like this: Url/Host: www.example.com Login: user Password: password Data_I_Dont_Need:
I need to keep track of the last login time for each user in
In my application,I do not want two user login with the same login name.
How to check if the user disabled javascript in his browser? For example: the

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.