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

storing results of a function - previous result overwritten with new result
I have created a function to validate input.

function validate_dimension($value,$name) {
<

Got A Free Server :(
So I was given a free server

http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1

Applet JTextField Size Problem
Hello,

I recently started making an applet to calculate certain values for airplanes. However

Custom list order
Hi there,

I have checked this tutorial and it's great till the point where I want to display

Output Buffering question
Hi all,

I've been trying to wrap my head around output buffering. So far I've found tons of

want a code for uploading and downloading
i m trying to upload and download to my site..i need upload and download code ...i use a code for up

distinct rows
Hi
version 10.2.0.3

I have a query output something like the following

ID

Multipe Dynamic Controls & AutoPostback Issue
I currently have a need to create many dynamic controls (Example Textboxes) that need to do a PostBa

need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is r

Strange cookie problem. setcookie dependant on where user was directed from?
Hello,

I have a website that sets a cookie when a user visits the website. The cookie holds a

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