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

Array disappearing in foreach loop
Okay, I have this problem where an array will become undefined in a foreach loop.

Here is the

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

Filename like the user name
I am creating a form and storing the values in file. Could anyone please tell me how to write a code

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

empty() error
Why does

Code: empty($USER_ID = $_SESSION["USER_ID"])
create this error...

The control with ID 'ace' requires a ScriptManager on the page
I'm trying to add a simple AlwaysVisibleControlExtender to my page, but it's not working. I get the

Help on Order Entry Form/System Where is best to begin.
I have a dilema and a very short amount of time at this point and I'm looking for some help on decid

IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoying

Problem writing URL into database
How would I write this into the database?

<?php echo "http://".$_SERVER['SER

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