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

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

SQL query not working well
Hi,
I made a small table with 5 rows and want to make them an sql consult using rownum

Sequencing or queuing parallel process
Scenario is as follows
There is one parent process say P1 and 4 child processes say A B C D

Validation
Hello

I know this is a really vag question.

I need to have a input field on a form th

How to create a static html menu from a database
Hi,

I have built a small cms which allows me to create simple html pages and then upload them

show random images
hey guys

can someone please suggest a way in which the following code can be edited so it onl

How to display random record from table?
I have the following code:

Code: <?php
$display_block .= "<input type=

reading partial code from external site
Hi,

I am trying to write a script for my website to get an article from an external website.

Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

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