When a user logins in my system I create a session with all his info such as firstname, lastname, photo, age, classroom, etc
So I heard something about Singleton where I can instance a class and I was wondering if after logged in, I could fill this class out with all his info and dont use sessions anymore.
So I would go to the database after login, bring its info and keep this only instance class up for all the pages.
Would it work ?
Don't use variables in singleton class to store login information, or you'll find all users will be using your website with the credential of latest logged-in user.
Btw, what's the reason you want to get rid of Session?
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?