How to Display / echo Flashdata In View Page In Codeigniter
I am wondering how how to display / echo Flashdatain view Page in codeigniter. Here Some point we have to aware before setting flashdata in codeigniter.
1 2 3 4 5 6 7 8 9 |
// Set flash data in our controller file $this->session->set_flashdata('your_key', 'Value'); // After that we need to used redirect function redirect("/signup"); // Get Flash data on view page $this->session->flashdata('your_key'); |
Name of message should exactly match with setting in controller and populate in view page.