[Solved] Get Instance Not Working In Library |
When I submit my form codeigniter get instance CI not working. Throws error below? I use HMVC.
Severity: Notice Message: Undefined variable: CI Filename: libraries/User.php Line Number: 17 Line 17 is $input_password = $CI->input->post('password'); Any ideas on whats wrong with library? PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
(07-04-2015, 05:56 AM)riwakawd Wrote: When I submit my form codeigniter get instance CI not working. Throws error below? I use HMVC. I got it working couple things I missed spelled in on of the config settings.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
I don't know how you got it working, but $CI should be $this->CI everywhere you're using it since CI is a property of your class.
$input_password = $this->CI->input->post('password');
(07-04-2015, 12:26 PM)CroNiX Wrote: I don't know how you got it working, but $CI should be $this->CI everywhere you're using it since CI is a property of your class. @CroNiX I have now updated it your way and works even better.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |