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

getAlexaRank($url) function not working
I have made a function to get alexa rank
the site is here: http://mytestsite.rack111.com/1

How would I protect......
I have a from, actually, a good amount of forms. How can I make it so you can't type the characters:

Help with syntax
Hi all!

The $bridge variable is not getting passed while it is contained in the line below:

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

Help on query replacing the date
Hi Pals,

i want to replace the current date in a column to some value say C or D or any n

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la

Bandwidth monitoring?
Hi guys,

I need a little information I have written a php app and I occurred to that I need

understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";

function get_nam

Count of reciepients in php mailer
How can i sent a mail to large no of reciepients say 10,00,00 Using PHP MAILER

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