Is it a good practice to store user info. in sessions?


Posted on 16th Feb 2014 07:03 pm by admin

I am making a user class for my script which stores all the user information in sessions. It takes user id as parameter and gets the info from database and stores it in the session variable. I did this for easy access of data as I don't want to query database every now and then.

Did you know?Explore Trending and Topic pages for more stories like this.
Is this a good practice? If not, why?
No comments posted yet

Your Answer:

Login to answer
94 Like 43 Dislike
Previous forums Next forums
Other forums

Get value from Select menu
Hi!

Have tried to find the solution on the web. Don't know if there is an easy one. A descrip

Mail sending is slow on server
Why mail is taking time to be send on apache-linux server

Estimations and Effort
HI Gurus,

Would like to know whether SAP have a provision for carrying out the Project es

Help with simple query
Hi,

I'm trying to do a Query with a Union where I want to print the number of rows $tc conta

What are the two different files you download to update kernel?
What are the two different files you download to update kernel?

Posting to another Site?
I have software that people install.
When they install it, is there a way to make it post their d

Creating a function
Basically i wanna put all this code in a seperate file

Code: <?php

Taylor Series Function
So I am working a a project for my intro C++ class, and I am having some trouble with a function for

Not "Just Another" MMORPG - text based.
Hello,

I've been learning MySQL and PHP for the last 2-3 years.
Though, I've had long paus

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash