Jump to content

Codeigniter Session Display


Pain

Recommended Posts

Hi there. I am trying to display a session variable on the page.

http://codeigniter.com/user_guide/libraries/sessions.html

Set: $this->session->set_userdata('username', 'Mr. Balls');

Get: $this->session->userdata('username')

 

However i am not sure if the code should be placed in the view or in the model?

 

You put it wherever you want to use it.

  • 4 weeks later...
  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.