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

highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm

function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the

Help with file_get_html
The following code gives the expected results:

<html>
<head&g

Move array index to end
Hey guys,
Quick question:

I have an array that looks like this:
Code: [Select]$var =

standard ALV application toolbar, into custom report....
HI,

I have a question regarding displaying standard ALV menu path and application toolbar

an interesting question
Greetings folks, got to ask an interesting question...

let say
i have created a function s

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

Delete records not in top 15
Hi,

I'm creating a hall of fame page in my game and the page will only display the top 15 sco

records between 2 dates
Hello all,

I have a date tracked table which contains effective_start_date and effective

Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co

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