codeigniter_tutorial
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
CodeIgniter<br />
//redirect to home page<br />
$this->load->view('flashdata_home');<br />
}<br />
public function add(){<br />
//Load session library<br />
$this->load->library('session');<br />
$this->load->helper('url');<br />
//add flash data<br />
$this->session->set_flashdata('item','item-value');<br />
}<br />
//redirect to home page<br />
redirect('flashdata');<br />
}<br />
?><br />
Create a view file called flashdata_home.php and save it in application/views/<br />
flashdata_home.php<br />
<br />
<br />
<br />
<br />
<br />
<br />
CodeIgniter Flashdata Example<br />
Flash Data Example<br />
<br />
Click Here to add flash data.<br />
<br />
<br />
Make the changes in the routes.php file in application/config/routes.php and add<br />
the following line at the end of the file.<br />
59