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

Displaying Multidimensional Arrays...about to put my head in a vice, PLEASE HELP
I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days.

Interpret Order
Hello all,

I'm wondering if I have this:

Code: $switch = array(
'one' =>

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

Unifying logins of two different scripts
I have two different game scripts which I want to embed on my own site. The problem is I don't want

Renaming array keys
The issue: renaming array keys inside a foreach loop.

I'm trying to build a pie chart image w

SESSION question
I am building an application , a directory for auctions.
For SEO i made a script which copies a p

retrieving policy name inside the function called by this particular policy
Hi there,

I've playing around with dbms_rls package, trying to set up some security repo

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

Multi Dimensional Array Append
Hi Guys

I have a function that returns a multidimentional array eg

$result = functio

Select question
Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if

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