Re: Objects in Arrays (without the READ prompt)

From: Date: Thu, 05 May 2005 16:38:27 +0000
Subject: Re: Objects in Arrays (without the READ prompt)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-214553@lists.php.net to get a copy of this message
Hi, I think you need to serialize your objects. http://us3.php.net/manual/en/language.oop.serialization.php Jason On 5/5/05, Stuart Nielson <snielson@inventra.net> wrote: > Sorry to everyone about the stupid READ notification on the posting. I > completely forgot that it was enabled. This one shouldn't have that > problem. > > I am using PHP version 4.3.4. > > I'm creating an authorization module that uses a users object, that > includes the username, usertype, etc. I want to store this in a session > variable (i.e. $_SESSION['objects']['auth'] = new Authorization();) so > that I can keep the information from page to page. However, I get an > error that it is an incomplete class everytime I try to access a > function from the object like this: > "$_SESSION['objects']['auth']->Login();". It works fine when > it's not > stored in the array. Is this a PHP 4 issue? Or is there something I'm > doing wrong? > > Any pointers would be helpful. If this doesn't work, I'll have to > rework > things to just store in arrays. > > Stuart > >

« previous php.general (#214553) next »