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.

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

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

mysql query with single quotes in a variable
$sitedetails = "INSERT INTO vars (address, sitename, description, ownername, theme) VALUES ('$u

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

Changing files over
Just thought I'd start with the new forums looking really nice .

Ok basically I've made this

checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou

Packet Design
Hi All,
Im new about network programming and I want to design a protocol but I have some question

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

Multi Dimensional Array Append
Hi Guys

I have a function that returns a multidimentional array eg

$result = functio

Are sessions secure at all?..
I haven't really gotten into yet, but I was just thinking of something weird..

Lets say you h

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