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

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Results from Db outputted twice
Hey guys.. for come reason my data is outputted twise shown in the image below and i cant figure out

"From field" in PHP email form
I used a wizard to create a PHP email form. I was able to customize it with the exception of the Fr

UDS 4.0 Datatype issue
UDS 4.0.322 -- connecting to NI Labview 9.0

When using connection method: Cache with live

Generate PDF
Hi guys,

I would like to know if there is a way to generate pdf when clicking on a link. In f

Help on code output
My CODE:

Code: [Select] echo "<phone>".$line["phone"].&qu

Registration
ok so i have a site where people can register and login which works now thanks to someone on here th

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Data storage spaces in varchar2
Trying to understand what's happening.
I am selecting a value from a table that is defined as c

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

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