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...
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...
In view, you can access all loaded library, model, and helper function directly. If in controller you have load the session, or do it in autoload, then doing this in views will work:
If you want to access some function that haven't loaded in autoload or in the controller, you can use this:
I usually use this for a common view that loaded by other views, such as displaying visitor country flag, etc.
Hope this help.
Load it into the view like any other piece of data...