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.

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

image upload, resize THEN submit form
Ok so I have a form that requires the user to upload an image, and then do something with that image

Ariba 9r - SAP MM Integration
Hi experts,

The standard Ariba adapter for 9r creates a relationship between Cost Centers

Dynamic Array using glob?
Is there an easier way to do this?

I am trying to get create a dyamic array based on files wi

User input in to variable
Hi all,

I'm sure this is very easy but I'm having another brain freeze!

At the end of

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

PHP Programming error. Please help!
Hi there,

Am making a website for a friend and have encountered a problem that i need fixing

quotes changing
hi all

in my content

opening quotes " changes to “

close qu

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

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