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

random generation
hi

i need help with generating this

numbers from 1-12

i want to generate in ran

understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";

function get_nam

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This i

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

Turning Data into URLs?
This may seem very basic to you, but I'm having a hard time figuring out how to do this since I don'

How to display random record from table?
I have the following code:

Code: <?php
$display_block .= "<input type=

insert Multiple rows into the table from that table data
Hi All,

I have a requirement like to insert mulitple rows into the table from that

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

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