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

How to login with SAPCPIC userid
I have changed the Password for SAPCPIC in Development Server for 000,001 and 100 client.
But w

puting for loop in 1 value
hi ,

how do i put this code in 1 value:
Code: <?php
for ($i=1; $i<=5; $i

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

How to show the difference between two data field in a database with php.
Hello php gurus,

how r u all... i'm not so well facing a typical problem please help me...<

Interpret Order
Hello all,

I'm wondering if I have this:

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

How can I get my program to read a larger array ??
Hi:

I have this program that reads from an array to do calculations. The array are just t

Click counter to ignore traffic from search bots
I have a click counter on my site that...well, counts the number of clicks a link gets on the frontp

limitations on array_unique()
Does any one know what/how imitations are applied to array_unique? I have an issue where no matter h

dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

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