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

Request-URI Too Large
I have created a simple submit form for a mysql database that puts a piece of code into database.<

AutoChoosing a CSS file based on URL
Hey everyone,

I have a site that has multiple URLs and CSS files.

Based on the URL tha

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

Sort Alternative/bi-monthly
Hi all,

Am going mad trying to get something to work.

I'm creating a CMS for a magazi

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

Namespace Problem
I'm having problem with a section of code with a variable namespace.

This code works fine:

limit string by words??
hello all,

I was wonder if there is a function to limit a string by the number of words inste

php web service error
hey guys,
I'm working on a project requires the use of web services. I've been trying a few tutor

Custom CMS
This is a big custom CMS script I'd like to develop and would like some help atleast figuring out wh

how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel

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