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

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

Just a white page
Okay so, my website, when I click SignUp on it it takes me to /join.php but its a complete white pag

Modal Popup Help
Hi guys, I have a modal popup with an iframe. How can i send data from a label or textbox to the ifr

Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bo

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

PHP error (line 38) my website
Hello everyone, I'm new on this
and I got a web site thats got a error not showing the photos on<

Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message s

Form submissing with PHP and JQuery/Ajax
I have searched everywhere, but cannot find a solution for this... I have worked all day trying to g

newbie question
Hi out thereIm totaly new in this forum and to .net and vb so here is a totaly newbie question.I wan

Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

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