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

Passing variables with pagination - iterating through unique id per link
Hi everyone,
I have seen a few topics like this one. Still cant find the specific thing, so I am

Upload Code Help
Hi everyone I need some help with a bit of code ive been working with for a while. I am completely s

PHP Code / Script To check weather the given email exists in a domain
Hi,

I want to implement the following in my web page

in sign up we will ask to enter u

Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it ha

MYSQL INSERT ID NOT WORKING
Code: $id = mysql_insert_id();
header("Location: ./?view=$id");
Why $id pulling blan

Limiting uploaded file type
Hi. First post here
I am working on a simple upload script, and I need it to limit the allowed f

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

HTML Form Server Side Validation
Hi, Im new here, im currently doing a website for a friend, and I have designed using snippets from

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