codeigniter_tutorial
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
CodeIgniter<br />
$this->load->library('session');<br />
//removing session data<br />
$this->session->unset_userdata('name');<br />
$this->load->view('session_view');<br />
}<br />
}<br />
?><br />
Create a view file called session_view.php and save it in<br />
application/views/session_view.php<br />
<br />
<br />
<br />
<br />
<br />
<br />
CodeIgniter Session Example<br />
Welcome <br />
<br />
Click Here to unset session 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 />
$route['sessionex'] = 'Session_Controller';<br />
Execute the above example by using the following address. Replace yoursite.com with<br />
the URL of your site.<br />
http://yoursite.com/index.php/sessionex<br />
57