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

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

Run function every 5 mins ??
I have a function PostMessage()

How can I run it every 5 mins ??

Displaying Column Names
I have a question regarding the ability to show the column names from my table/query.
What I'm lo

Making multiple rows with one query
I have a table called efed_handler_characters with two fields handler_id and bio_id. What query 2 is

a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

Move array index to end
Hey guys,
Quick question:

I have an array that looks like this:
Code: [Select]$var =

Help =( !! Upload Pics [PHP script]
Hello
I need help with a php script [MULTIPLE UPLOAD IMAGES] , where I want to add a feature (wat

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