[eluser]orangeblossom[/eluser]
First, let me say thanks right off the bat. Hope I posted this in proper location.
Second, I have worked so hard in learning html, ccs, and tons of web stuff in 1 year. All self-taught. Now, I'm learning php, by learning how to write my own cms using codeigniter. Please don't ask why I have taken on a large project as so...I just learn faster by doing it, one step at a time. Not like I have to have it done this week.
Third, yes, I have watched documentation, read blogs, searched forums and more. So...if I post on a forum, then it is my last straw. I'm a real, huge noob on this, but I love this stuff and really want to learn.
With that said, all's going well until I create a membership.php page as in the tut. Hit the login button, and I get the following error.
Fatal error: Class 'CI_Models' not found in D:\Hosting\8825649\html\CRM\application\models\membership_model.php on line 3
{{{{{Please note that I already changed Models to CI_Models}}}}}
What is odd, is that I 'realize' that I have the new version, and all these models, controllers, etc...must be changed to CI_whatever.
So, I try to do just that....nothing works...so here is original:
1) membership_model.php
Code:
<?php
class Membership_model extends CI_Models {
function validate()
{
$this->db->where('username' , $this->input->post('undername'));
$this->db->where('password' , md5($this->input->post('password')));
$query = $this->db->get('membership');
if($query->num_rows = 1)
{
return true;
}
}
}
2) Here is my model in core:
Code:
class CI_Model {
/**
* Constructor
*
* @access public
*/
function __construct()
{
log_message('debug', "Model Class Initialized");
}
/**
* __get
*
* Allows models to access CI's loaded classes using the same
* syntax as controllers.
*
* @param string
* @access private
*/
function __get($key)
{
$CI =& get_instance();
return $CI->$key;
}
}
// END Model Class
/* End of file Model.php */
/* Location: ./system/core/Model.php */
3) Here is my template.php:
Code:
<?php
if (!defined('BASEPATH')) { exit('No direct script access allowed'); }
$this->load->view('includes/header');
$this->load->view($main_content);
$this->load->view('includes/footer');
?>
I believe that should be it, unless you require my controller/login.php.
I'm sure this is a very easy question. I have read the particular blog on changing the parent::_whatever thingy. It just does not work for me. I went into the core model and did just that.
Please let me know where I make the changes to correct this situation. I appreciate it.
Have a great one.
OB.