I have a question regarding the passing of parameters between MVC.
I'm developing email confirmation on a project. After clicking on the link to confirm sent by email, the system picks up by GET, the encrypted password and "I want to change the 'active' field in the database."
Beginning of my Controller:
public function index()
{
$this->load->model('confirma_model');
My View:
$h = $_GET['h'];
if (!empty($h)) {
$this->confirma_model->confirma('$h');
}else{
redirect(base_url('/'));
}
Finally my Model:
public function confirma($h){
$this->db->where('md5(id)',$h);
$dados['ativo'] = '1';
return $this->db->update('usuario', $dados);
}
Thank you!