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

Help with echo()
I'm having some problems with this code:

Code: echo '
<A HREF="jav

PHP onsubmit in the form not going to the fuction.
I have a form through ‘onsubmit’ calling a function validation(). But not going to the

date function help
i need help with date function

Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD H

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexp

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

About imagecopyresampled()
Hello,

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

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

Request for tunning the below query
Hi,

Can any one help me on the below query while improving the performance,

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