Hi friends I'm new to CodeIgniter, I've downloaded version 3.04 and in controller page i've created parent constructor .
Controller :
class Vote extends CI_Controller {
public function construct(){
parent::__construct();
$this->data['theme'] = 'admin';
}
public function index()
{
$this->data['page'] = 'login_page';
$this->load->vars($this->data);
$this->load->view($this->data['theme'].'/template');
}
Error :
A PHP Error was encountered
Severity: Notice
Message: Undefined index: theme
Filename: controllers/vote.php
Line Number: 30
Backtrace:
File: C:\xampp\htdocs\poll\application\controllers\vote.php Line: 30 Function: _error_handler
File: C:\xampp\htdocs\poll\index.php Line: 292 Function: require_once
Why do I get an error like this I have added $autoload['helper'] = array('url'); also.
$this->load->view($this->data['theme'].'/template');to$this->load->view($this->data.'/template');and try - Pathik Vejani