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

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

Having a problem get the selected item from a drop down menu
I have been looking at this for days now.

I have a drop down menu that get it's values from a

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.

I have a form with several drop down me

OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

email form (cannot find the problem)
Hello there. I've been having trouble with an email form. Can't find the problem really. I've tested

Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so

New Search Engine problem
Hey everyone,

I have a ZIP Code Radius search engine already functional. it displays all of 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