1
Good, I’m trying to make a page that shows the user 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 did the $username echo and printed.
<input class="form-control" id="nome" value="<?php echo $perfil->nome?>" type="text">
And gives error: Undefined variable: profile. What have to put to print values?
Thank you.
Missing the Return in function
– Sr. André Baill
@Andre Bail I already put Return at the end of the function:
return $result->result();
. Yet I still have the same problem.– Claudia