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

PHP MySQL and DATE
Hi everyone

I have a databse and in one of the columns I have date values such as 2009-March-

php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way

Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de

Java API in PHP?
I have an application that we use internally here at the office.

The software company provide

UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho

Undefined offset
The following script checks to see if the user answer matches the correct answer.

Form Fiel

single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be

Form always sends to error page...
Hello,
Any help will be greatly appreciated. I am having trouble getting multiple fields to be re

my code does not work.
I have a code problem.

Quote"<a href=index.php?gogo=ureticidetay&'?l={$le

Help =( !! Upload Pics [PHP script]
Hello
I need help with a php script [MULTIPLE UPLOAD IMAGES] , where I want to add a feature (wat

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