Storing PHP Object in session

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Wed Jun 27, 2012 5:30 am

Thought I am not an expert on this topic, my limited knowledge tells me that storing an object in a session variable is not a good practice for a variety of reasons.

But, you can try this: serialize the object before storing to session variable and unserialize it after you get it from the session. Read about serialize and unserialize from

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests