Welcome Guest, Not a member yet? Register   Sign In
Multiple Controllers
#1

[eluser]Jimster[/eluser]
Hello

I'm new to CI so this may be newbie headset problem.

I have two controller files

<b>home.php code</b>

&lt;?php

class Home extends Controller {

function Home()
{
parent::Controller();
}

function index()
{
$data['title'] = 'NSBAUSA - Home';
$this->load->view('view_home', $data);
}
}


<b>nsba_login.php code</b>

&lt;?php

class NSBA_Login extends Controller {

function NSBA_Login()
{
parent::Controller();
}

function index()
{
$data['title'] = 'NSBAUSA - Login';
$this->load->view('view_login', $data);
}
}


On the home page view I have a link to the login page.
When I launch the login link on the home page I get the following error.

<b>Fatal error: Class 'Controller' not found in C:\xampp\htdocs\NSBAUSA\application\controllers\NSBA_login.php on line 3</b>

What code do I have to change in the second controller file to make this work?
Can I have multiple controllers?
Am I making a bad assumption on implementing multiple controllers?

Thanks for the help

Jimster


Messages In This Thread
Multiple Controllers - by El Forum - 09-07-2010, 12:12 PM
Multiple Controllers - by El Forum - 09-07-2010, 12:15 PM
Multiple Controllers - by El Forum - 09-07-2010, 12:21 PM
Multiple Controllers - by El Forum - 09-07-2010, 04:34 PM
Multiple Controllers - by El Forum - 09-08-2010, 04:21 AM
Multiple Controllers - by El Forum - 09-08-2010, 07:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB