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

Pagination
Hi All,

I think I'm finally getting somewhere with pagination!

I can now submit a quer

How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p

Bar charts using Graphical Framework.
I am using Graphical Frameworks(GFW) to create a chart Graphic . There is no problem with the data d

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

Need Successful Return
Hello I am currently working a form here, and I have everything figured out except when I click the

Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields

with clause
hi all, i have a big query that usually access the same table more than once. for example, i have s

Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything

Concatenate two strings ???
I have string one $string1 and another $string2.

How to concatenate (add) both of them $str

db entry based on primary key
My "topics" table contains 10 entires
*--------------*
topicid topic
------

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