$session |
[eluser]GI-Joe[/eluser]
Can I use session created in one controller in another controller. say in Controller A Code: $this->session->set_userdata('data','somedata'); Can I use it in another controller Controller B Code: echo $this->session->userdata('data');
[eluser]InsiteFX[/eluser]
Yes the sessions are global to your application. But if you need to access them from a library then you need to use the CodeIgniter Super Object.
[eluser]Otemu[/eluser]
Yes check out the session class Quote:The Session class permits you maintain a user's "state" and track their activity while they browse your site.
[eluser]GI-Joe[/eluser]
Code: A PHP Error was encountered Getting this error
[eluser]InsiteFX[/eluser]
Autoload the session library in ./application/config/autoload.php
[eluser]GI-Joe[/eluser]
[quote author="InsiteFX" date="1339225230"]Autoload the session library in ./application/config/autoload.php [/quote] I have done that still can't get session data in constructor |
Welcome Guest, Not a member yet? Register Sign In |