Flash data in codeigniter is also like session data ,but the validity of the flash data is upto the next server request.

Creating a Flash data:
Syntax:
      $this->session->set_flashdata('item','value');

Reading a Flash data:
Syntax:
     $this->session->flashdata('item');

Extending the validity of the Flash data:
Syntax:
     $this->session->keep_flashdata('item');