SESSIONS: What does this error mean

From: Date: Thu, 10 May 2001 07:17:35 +0000
Subject: SESSIONS: What does this error mean
Groups: php.general 
Request: Send a blank email to php-general+get-52236@lists.php.net to get a copy of this message
Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition cl_korisnik_data of the object you are trying to operate on was loaded _before_ the session was started in user_info.php on line 72 I declared class like following in the first script file: class cl_korisnik_data { var $kname, $ime, $kid, $prezime, $jmbg, $klevel; }; session_register("korisnik_data"); $korisnik_data = new cl_korisnik_data; // Then loaded some data into $korisnik_data, all passed OK In called script user_info.php i wrote code: <?php session_start(); echo($korisnik_data->ime); ?> ... and got upper error. Now, what is wrong? Just to make better question, do classes also need to be registered within a session? If so, how? TIA, Davor

« previous php.general (#52236) next »