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

array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 p

ereg_replace()
Basically what i need to do is

$title = "This Suck's"

$striped = ereg_repl

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

Variable Clash
In the past I've had variables clash. For example:

Code: <?php
$c = 5;
$ca

Set Categories
I am creating a submission form for somebody to come in and submit products. These products are sep

Issue Parsing XML into table
Hello all,

Im a bit new to php and new to phpfreaks. But thanks in advance for the help!
<

Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

Lack of simpleXML Documentation
What is up with this.

Look at: http://www.php.net/manual/en/function.simplexml-load-file.php<

Upload Code Help
Hi everyone I need some help with a bit of code ive been working with for a while. I am completely s

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