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 & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

Preventing blank or already entered values
Im trying to learn how to place a read file line by line and prevent duplicate entries and also BLAN

login box shows up again after logging in 2nd login works
Hello,

I am having trouble on my site Lockerz.rack111.com where when you login the login box

no idea what to do...
I'm fed up. I had issues with code that I have working on a different site that didn't work on my cu

Sorting JTable on more than just the values listed in the columns
I have a collection of objects that store (among other things) two integer values. I only want to di

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

Array to string conversion
Can anyone help me with this?

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

At max how many columns is advisable to create in a table/view
Hi All,
I have two transaction table from which i want to create a simple view or material

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