Reputation: 1329
I have a problem loading a model, i have code like this
function __construct() {
$this->load->model("admin_model");
parent::__construct();
}
function login() {
$log = $this->admin_model->login($username, $pass);
}
if i use the code above, i get this error A PHP Error was encountered
Severity: Notice
Message: Undefined property: admin_controller::$admin_model
Filename: controllers/admin_controller.php
Line Number: 43
Fatal error: Call to a member function admin_login() on a non-object in C:\xampp\htdocs\ci\application\controllers\admin_controller.php on line 43
Upvotes: 0
Views: 55