Welcome Guest, Not a member yet? Register   Sign In
How to stop CI from continuing?
#10

[eluser]mihailt[/eluser]
come on guys...

all you need is to extend a controller.
create something like:

Code:
class APP_Controller extends controller{
    public function __construct(){
        parent::__construct();
        

        if(!$this->session->userdata('somedata')){
        // do what you what here - implement logic, load views etc.      
        }
    }
}
place it in library folder, and then make all controllers to extend APP_Controller instead of Controller.

also if you would check user guide on views, you would see that $this->load->view() method accepts 3 parametrs and third allows to store view in a variable.

good luck.


Messages In This Thread
How to stop CI from continuing? - by El Forum - 11-19-2008, 01:52 PM
How to stop CI from continuing? - by El Forum - 11-19-2008, 02:53 PM
How to stop CI from continuing? - by El Forum - 11-19-2008, 03:06 PM
How to stop CI from continuing? - by El Forum - 11-19-2008, 04:50 PM
How to stop CI from continuing? - by El Forum - 11-19-2008, 04:59 PM
How to stop CI from continuing? - by El Forum - 11-19-2008, 05:49 PM
How to stop CI from continuing? - by El Forum - 11-19-2008, 06:51 PM
How to stop CI from continuing? - by El Forum - 11-19-2008, 07:17 PM
How to stop CI from continuing? - by El Forum - 11-19-2008, 07:18 PM
How to stop CI from continuing? - by El Forum - 11-20-2008, 05:51 AM
How to stop CI from continuing? - by El Forum - 11-20-2008, 07:46 AM
How to stop CI from continuing? - by El Forum - 11-20-2008, 08:29 AM
How to stop CI from continuing? - by El Forum - 04-11-2009, 03:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB