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

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

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

Different payment methods with different cross company requirements in F110
We are implementing SAP in a company in the shipping industry. They have the following requirement:<

Serial number of exernal hard disk/Thumbdrive
Hi guys, I am new tio java networking concepts.Please tel me how to get Serial number of exernal

UTL File problem
Hi
I have a file in certain path with the following permissions (The file is a dummy file witho

Select question
Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess

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