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

gather checkbox data from form into email
Hello all,

First, i'd like to thank everyone who responded to my previous posts regarding set

background color imagefill
Hello

I would like to ask you why I see this square in red color just in my local xampp insta

Progress bar for webpage
Hi,
I want to implement a progress/waiting bar on my webpage - exactly the same thing that the Mi

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

PHP page is blank
Hi Everyone,

I have a site in which I am able to open the first PHP webpage in my browser but

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

Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,

I have a script with some options.

I use regex to replace patterns in strings, but

Rss feed question
Hi

My blog and my website are different. Am i able to take my rss feed
from my blog and p

login form can you find my error?
registrationform.php seems fine send data to registration.php
registration.php seems fine checks

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

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