the model does not connect |
I am using the latest version of Codeigniter, the NetBeans program for the code and XAMPP.
In the controller I have the following code (it's called Sesion.php): PHP Code: <?php In the model (it's called Usuario.php): PHP Code: <?php The error: PHP Code: An uncaught Exception was encountered Note: the function receives the two variables perfectly I think that it should work but I do not know what happens, I hope you can help me. Regards!
@adanwaky,
It might be that the name of the model needs to have a capital first letter. Instead of $this->usuario->ExisteUsuario() it might need to be $this->Usuario->ExisteUsuario also... instead of $this->load->model('usuario'); it might need to be $this->load->model('Usuario'); The reason I say this is because in your error message it states that... Call to undefined method Usuario::ExisteUsuario() DID you notice the capital first letter of the Model? Also, any reason why you don't return a value of FALSE if the model function if condition is not completed? I always try to either return a value or FALSE from a model so that I will always know if it was successful or not. |
Welcome Guest, Not a member yet? Register Sign In |