Hi,
I have a problem with the session variables.

<?


class Autorizacao
{
 
//Atributos-------------------------------------------------------------------------------
 var $nome_usuario;
 var $webmaster_mail;
 var $acao;
 var $url_sistema;

 
//Métodos---------------------------------------------------------------------------------
 function Autorizacao(){
  $this->nome_usuario = "vazio";
  $this->webmaster_mail = "[EMAIL PROTECTED]";
  $this->acao = "inicio";
  $this->url_sistema = "http://localhost/web/ ";
 }

 function autorizaSistema($param_usuario, $param_passwd){
  //Verificar no banco se o usuario existe
  $this->nome_usuario = $param_usuario;
 }
}


session_start();

if (!session_is_registered("SISTEMA")){

 //Registra a sessao
 session_register("SISTEMA");
 $GLOBALS["SISTEMA"] = new Autorizacao();
 echo "Seta sistema";

}

echo $GLOBALS["SISTEMA"]->url_sistema;

echo "teste";

echo "<A href='in2.php'>reload</A>";
?>

at the secons time that this code is executed generate this error.

Fatal error: The script tried to execute a method or access a property of an 
incomplete object. Please ensure that the class definition autorizacao of the object 
you are trying to operate on was loaded _before_ the session was started in 
C:/XITAMI/webpages/WEB/in2.php on line 38

Please help

Tkx.
R3.

Reply via email to