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

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

preg-match with a string and numbers
Hi, I can't get the expression to work for my preg_match, what I'd like is for it to match the strin

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

count only commas outside parenteses
I have a sql table containing
id - query - query name
the first page contains a drop down men

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

Oracle Connectivity
Hi Every One,

Can we access SAP from oracle database.If it possible then please spec

Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.

need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for

SOAP Issue
Hi,

I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.

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