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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:21:25+00:00 2026-06-04T23:21:25+00:00

I was wondering if using $_SESSION[‘data’] would be a smart way to hold information

  • 0

I was wondering if using $_SESSION[‘data’] would be a smart way to hold information about a user who is logged in.

For example:

Say i have a game and i want to display their level/exp/username etc, well currently every page load i have to recall the database… so im wondering if i store it in a SESSION i can use a boolean to tell PHP if it needs to re-update its data… thus reducing the amount of MYSQL calls ?

Is this a smart idea of is there some flaw im unaware of ?

  • 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-04T23:21:27+00:00Added an answer on June 4, 2026 at 11:21 pm

    what about competition between database updates? How would you know if the data is not up to date anymore? If this is a straightforward and reserved data to the logged user, allowing him to be logged in only once at a given time, then why not 🙂

    If you seek an alternative, there’s this new thing of local storage, by HTML5

    http://diveintohtml5.info/storage.html

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

Sidebar

Related Questions

I'm wondering how to go about using Authlogic to auto register a user who
I was wondering if using Lightbox all over the site would be a smart
I'm wondering about using Redcarpet's :with_toc_data option for Markdown working with Middleman (a Sinatra-based
I am wondering about using the abstraction in Zend Db RowSet instead of joins,
I wanted to know what would be a good way for storing the information
I'm wondering whether for security purposes it would be worth using the session_name() function
Possible Duplicate: Where are $_SESSION variables stored? I'm using this to store some data
I am wondering, if there is a real-time way time ping a user and
I'm using CodeIgniter 2.1 I use CodeIgniter's session to handle whether a user logged
I was wondering if using HTML entities in meta tags (like keywords and description)

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.