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

Basic Question Regarding PHP Includes
Hi

Just starting out with PHP.

Working on a site that uses some basic includes, these

Error with Font and imagettfbbox
I keep getting an error that says "Warning: imagettfbbox() [function.imagettfbbox]: Could not f

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

Pls help with PHP
Pls can anyone direct me on how to create a user account for a customer. For example i want know if

Download Image from URL and Upload it
Ok, I have been googling for the last 1/2 hour trying to figure this out, Most likely I'm just not s

filesize problem
i use ubuntu 9.10 and i have mountet a folder from an windows

/mount/FOLDER
/mount/FOLDER/

ALV sum various columns problem
Hi all,
I'm doing a report on ABAP for a timesheet of the current month. The output i want is s

How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" '

Code: [Select]preg_

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