Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to CodeIgniter...

Please Help! Thanks...

like image 664
Aayush Avatar asked Nov 14 '09 03:11

Aayush


1 Answers

Load it into the view like any other piece of data...

$data['item'] = $this->session->userdata('item');
$this->load->view('view', $data);
like image 187
Galen Avatar answered Sep 30 '22 22:09

Galen