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

Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

Need help in log in and log out?
hi there all of u. i have recently created a site for someone. i have placed log in and log out and

MS Access data into a html table
Hi everyone, I am quite a novice at php but I have created some helpful scripts that fetch data
f

this code is strange !
Hi i got this code from the web.. It checks for live and dead socks
It is working perfectly on my

Problem with Subscreen
Dear Experts ,
I am facing a problem with the subscreens. My senario is as follows :

Strange php code found on my website
I got hacked and the following code was placed within my files:

Code: [Select]<?
/*

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

DATEDIFF Question
First time post, and of course it is a help question.

I am using a WP plug-in to display prev

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

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