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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:27:07+00:00 2026-06-04T09:27:07+00:00

I have a log in system where a user can check the Remember me

  • 0

I have a log in system where a user can check the “Remember me” option. When the user checks that option, I store the session_id into a cookie and write his session_id, ip, browser info, etc into a database session table. So when the user comes back, I make sure the cookie has not been faked based on session_id/ip/browser/etc that is stored in the session table.

Now that seems like it might be a lot of overhead and db writing. Is there a better and secure way to do it without so much overhead?

  • 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-06-04T09:27:09+00:00Added an answer on June 4, 2026 at 9:27 am

    It’s a trade-off: when the data is not being stored in a database, it ends up hitting the server’s local filesystem where PHP stores the session data. Phrased a different way: what is slower? One random access database hit or one random access disk hit?.

    I find storing the session to the database to be a more elegant solution as it’s easier to track users and their sessions than guessing based on file system contents. It also allows you to manually log off a user at any point or simulate logon sessions (one time password resets).

    If you’re using MySQL, set engine for the “session” table you’re using to MEMORY and you’ll always have an extremely fast lookup that shouldn’t affect user experience.

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

Sidebar

Related Questions

I have a log function on my admin panel that checks user input for
We've faced strange problem. We have log on service, that authenticates user, adds auth
I'm using PHP5 here. I have made a login system that check's the username
We have a service using WCF and Impersonation. A user can log in to
I'm writing a GUI application that will have a user log in feature. Each
I have a log-in system, where people can login with an username. I really
I have set up a login system that checks a mysql db validating username,hashed
I have a system which is receiving log files from different places through http
I have a problem with a client, who cannot log in to our system.
I have a log that is really huge. (millions of rows) LogTable ------- ID

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.