Re: session start error

From: Date: Mon, 29 Oct 2001 18:21:16 +0000
Subject: Re: session start error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-72756@lists.php.net to get a copy of this message
try: session_register("tb"); $tb = new tabela("tb_area_interesse", "Área de Interesse"); then after using sesion_start() in the next script $tb should contain your object. Richard "Cdré «góvîj érg" <aocastanheira@cariocaengenharia.com.br> wrote in message news:1004377989.3bdd97852e644@webmail.cariocaengenharia.com.br... > Hi, > I use php 4.0.6 and I would like to do the following : > > teste_classe1.php > <? > require ("classes.inc"); > session_start(); > echo("<html>"); > echo("<body>"); > session_register($tb); > $tb = new tabela("tb_area_interesse", "Área de Interesse"); > ?> > > <a href=teste_classe2.php>teste_classe2</a> > </body> > </html> > > > teste_classe2.php > > <? > require ("classes.inc"); > session_start(); > echo("<html>"); > echo("<body>"); > $result = $tb->qual_tabela(); > echo $result; > session_unregister($tb); > session_destroy(); > ?> > </body> > </html> > > > When I load teste_classe1.php, its ok, but when I click on teste_classe2 link I > receive : > > Fatal error: Call to a member function on a non-object > in /home/httpd/html/curriculum/adm/teste_classe2.php on line 6 > > > any ideas ??? > > Obrigado, > André Castanheira > Carioca Engenharia S.A. > +55 21 3891-2200 r; 2325

« previous php.general (#72756) next »