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

Asked

Viewed 108 times

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);
} 

1 answer

1

It is not necessary. A documentation informs that this type of data is self-destructed (Below, excerpt from 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 method set_flashdata()from the session library to mark, you no longer need to do anything to erase this data.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.