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

Buggy registration system
Hey, I just started scripting in PHP, and I ran into a few problems.
Code: <?php
includ

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

Storing user data help?
Hey Guys,

I'm not use if this question is to broad but I can always give you more informatio

Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had

mysql select query problem
how can i select multiple fields from multiple table in one query like

i have table name t1 a

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

Problem with the Update command used with a sqldataadapter
I'm connected to a database on an SQL Server and I'm using a sqldataadapter, sqlconnection, sqldatas

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

IIS & NW MII on the same server
Hi,

We're weighing the possibility to run both IIS and MII (NetWeaver) on the same server

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

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