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

Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro

Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

Login logout link help
Hi all,

Im new to php and Im having trouble creating a login/logout link for my page that dis

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to re

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

need help modifying script
Hi guys,

I'm fairly new to php and am having a bit of trouble modifying a script.

This

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'

Exporting new records
Trying to figure out the best way to set this up.

People register my site.

Their prof

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

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