Well, I'm trying to make a page that shows the user's data that is logged in.
Model:
function getAllDisplayable3()
{
$username = $this->session->userdata('username');
$this->db->select('id_login, nome, username, password, cod_postal, telefone, email, localidade, rua');
$this->db->from('login');
$this->db->where('username', $username);
$result = $this->db->get();
//echo $username; echo die();
}
I made the echo of $ username and printed.
<input class="form-control" id="nome" value="<?php echo $perfil->nome?>" type="text">
And gives error: Undefined variable: profile. What do I have to put in order to print the values?
Thank you.