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

very easy question about SQL info
I think that I have a very easy question.
I know how to create a form using php SQL and

how to easy edit text, with box? Help.
I have a little problem. I'm doing a webpage for my aunt and I would like to make it as easy

Why do I get this error?

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or

Sort Alternative/bi-monthly
Hi all,

Am going mad trying to get something to work.

I'm creating a CMS for a magazi

Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it ha

Any decent php formatter/beautifier/pretty printer?
Any decent php formatter/beautifier/pretty printer class/function?

I found the following whil

Taking an HTML form and a PHP program and making it into one working file.

So I would like to display everything INSIDE a specific directory. In other words, I

a multi dimensional array with for each
hi, I have been asked to write an array, I have Zone 2,3,4,5,6,7,8 each zone has 3 sections of weigh

natcasesort works on one server but not on another

I have a problem that I was hoping that someone can help me with.

I'm trying to use

please help me in this update statment
hi every one

if I have table and this data in it

id name

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