class Usuario {
public $nomecompleto;
}
$DadosUsuaio = new Usuario;
$DadosUsuaio->nomecompleto = $nome_completo;
For example this variable $ full_name, name my case when I give var_dump, gives error.
Could you help me?
class Usuario {
public $nomecompleto;
}
$DadosUsuaio = new Usuario;
$DadosUsuaio->nomecompleto = $nome_completo;
For example this variable $ full_name, name my case when I give var_dump, gives error.
Could you help me?
The suggestion I give you is to use getters and setters
Since you're using Object Orientation, it's easier:
class.user.php:
class usuario {
private $nome;
public function getNome(){
return $this->nome;
}
public function setNome($nome){
$this->nome = $nome;
return $this;
}
}
In your class.usuariodao.php retrieving the data that comes from the bank, not forgetting to use require or include;
$dadosUsuario = new usuario();
$dadosUsuario->setNome($row['nome']);
And where will you view the variable:
$dadosUsuario = new usuario();
echo $dadosUsuario->getNome();
I hope it helps.
Hugs, Success!