How do I automatically delete flash_data message after it is displayed in codeigniter

0
elseif($aulas_professor[0]['controle_aula'] == 0){
   $desativado = $this->session->set_flashdata('desativado', "O Professor selecionado Não está ativado ,ative-o e tente novamente!");
   return $this->calendario($desativado);
} 
    
asked by anonymous 24.11.2017 / 17:42

1 answer

1

No need. The documentation informs you that this type of data is self-destructive. of the documentation, in free translation):

  

CoedIgniter supports flashdata, or session data that is only available for the next request and will be automatically deleted.

If you are using the set_flashdata() method of the session library to mark, you no longer need to do anything to delete that data.

    
26.11.2017 / 15:43