Well, I'm trying to print values on a page of a select I've done in a model. But give me the error: Undefined variable: login. Controller:
function perfil()
{
$this->load->model('perfil_model');
$data['list'] = $this->perfil_model->getAllDisplayable3();
$data['username'] = $this->session->userdata('username');
$this->load->view('perfil_view',$data);
}
Model: profile_model
function getAllDisplayable3()
{
$this->db->select('id_login, nome, username, password, cod_postal, telefone, email, localidade, rua');
$result = $this->db->get('login');
return $result->result();
}
View: profile_view
<input class="form-control" id="nome" value="<?php echo $login->nome?>" type="text">
What is wrong or missing? Thank you.