0
Good night,
I am using Codeigniter 3.1.10. I have a problem sending a specific data from the Model database to the Controller:
var_dump($data) returns me only the array I passed that would be the email,
i need to return the accessed data from the column database checkkey
How can I do that?
var_dump($test); does not return anything...
Model:
public function reenvioSenha($dados) {
$this->db->select("email,verifica_key");
$this->db->from("usuarios");
$this->db->where_in("email",$dados);
$query = $this->db->get();
if($query->num_rows() > 0) {
foreach ($query->result() as $key => $value) {
$teste = $value->verifica_key;
}
return $teste;
} else {
return false;
}
}
Controller:
public function reenviar_senha() {
$dados = array (
'email' => $this->input->post('email')
);
if($this->Usuarios_model->reenvioSenha($dados) == true) {
var_dump($dados);
var_dump($teste);
exit;
}
}