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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

PHP and Javascript
Hello Everyone,

I have a page that needs a javascript code to be written between PHP code but

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redi

RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

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

// foreach

Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit

Logging and nologging bulk insert
Hi,

oracle version: 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

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