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

dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.

Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since co

Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The

Internal Server Error issues
This has been bothering me for weeks and I've been trying to solve it without asking for help, but e

How to show next and prev records
Hi all,

Sorry if this is simple, i'm very new to php, well, any programming language actually

Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,

I have a script with some options.

I use regex to replace patterns in strings, but

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

Search in the PHP Files
have to search asterisk(*) in the php code of the php files .
In the html page one text box

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