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

Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a var

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

Call db table from any PHP file
Hi,

I want to be able to call a database table that will be setup in another file called init

Suggestions for Functional module
Hello experts,
I Have done B.Sc(Mathematics) and MCA & have learnt SAP/ABAP but do n

Month String to Numeric?
Hi guys,

Given a month as a string, is there a simple way to find the numeric representation

a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload

php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following

Open link with largest int string first
I have the following links i would like to open either all at once or one-by-one. How would i procee

if description does not contain the following words
Hello everyone,

I am parsing a MS Excel (.xls) file and adding it's content to a mySQL databa

Help with file_get_html
The following code gives the expected results:

<html>
<head&g

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