3
Notice: Undefined property: stdClass::$nome in C:\xampp\htdocs\peliculas\Model\Cliente.class.php on line 79
Notice: Undefined property: stdClass::$id in C:\xampp\htdocs\peliculas\Model\Cliente.class.php on line 80
how do I solve this error the line in question error at 79 and 80 are:
$_SESSION['nomeCliente'] = $row->nome;
$_SESSION['idCliente'] = $row->id;
public function logarCliente(){
$c = new Conexao();
$sql = mysqli_query($c->conectar(), "SELECT email, senha FROM clientes WHERE email = '{$this->getEmail()}' AND senha = '{$this->getSenha()}' AND ativo = 1");
$c->desconectar();
if(mysqli_num_rows($sql) > 0){
$row = $sql->fetch_object();
$_SESSION['nomeCliente'] = $row->nome;
$_SESSION['idCliente'] = $row->id;
$_SESSION['logado'] = true;
return true;
}else{
return false;
}
}
I didn’t even see that obg by the Resp
– gustavinhoDev