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

Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Warning: Cannot modify header information - headers already sent by (output sta
Warning: Cannot modify header information - headers already sent by (output started at /home/praylif

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

need help with mail()
hi i want to send an email with attaching pdf file using php. i have the following script but the pr

Grouping and sorting results
Please help with this query.

I have 2 tables in a database, countires and cities. states look

convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javasc

Windows Authentication
I have a website which is windows authenticated.
now i want something more on this application.<

Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).
I keep getting the

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