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

Including calander to page - will not show other months than current??
im trying to add an existaing calander onto a profile page by using Code: <?php include "

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

Need help with cin setw
I made a program here is my code:

#include
#include
#i

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

php calculate
this code echoes correctly the sum but the inserted result is 0??
Code: <?php
$TotalNum

session_destroy();
new to php
I have a simple login and am trying to write a logout.
I set a $_SESSION var to 1 i

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

$_FILES array
Ok,

I just started experimenting with PHP today. My goal right now is to have people be able

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

Pagination
Okay here is the page in question: http://blenderteachings.000a.biz/tutorials.hamishhill.php

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