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

SELECT * FROM users WHERE Users are not in Blocked
How do I select all users from users table where there users_id is not stored in the block table

Simultaneous select/update/insert
Hi

How would I need to go about when 2 users update a single row simultaneous? And how would

How can use this array as a key?
Say I have this array for example:


print_r($array);

Prints:
Code: [Select]Array

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

Login page problems
I developed a website a few months ago and I am now having an issue with logging into it. The place

PHP onsubmit in the form not going to the fuction.
I have a form through ‘onsubmit’ calling a function validation(). But not going to the

Email to a friend script problems
I have this send-to-a-friend script with 2 issues:


1) When you open the form popup on a p

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

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