note 16536 deleted from ref.session by jimw

From: Date: Sat, 03 Nov 2001 18:23:20 +0000
Subject: note 16536 deleted from ref.session by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20384@lists.php.net to get a copy of this message
I just spent 6 hours ripping my hair out over passing objects through sessions. As mentioned above you need to include your class BEFORE you register the object. i.e. <? session_start(); include("inc/your_class_file.php"); session_register("object_var"); ?> other than that, you do not need to serialize and unserialize the object, PHP does that automatically for you. Hope this helps anyone else who might run into the same headache I did.

« previous php.notes (#20384) next »