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

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not

PRotect my POST DATA... FROM HTML ATTACKS
I need to like let's say

If a user submit's his Prayer and he put's <meta refresh stuf

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

Line break?
Hi, I'm new to the forum and new to php. I'm not sure if I'm using the correct terminology so here i

how to export excel file in same server
My first post - php newbie, so appreciate your support.

I'm currently using headers to save w

PHP template help
Ok, I don't know if anyone can help me but I am using PHP templates to make a site. I am a newbie an

curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

Best PHP Documentation generator
Hello guys!

I would like to hear from you what is the best PHP documentation generator. Perso

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