site_model error |
[eluser]davy_yg[/eluser]
controllers/admin/site.php Code: <?php models/Site_model.php Code: <?php A PHP Error was encountered Severity: Notice Message: Undefined property: Site::$site_model Filename: admin/site.php Line Number: 10 Fatal error: Call to a member function get_records() on a non-object in C:\xampp\htdocs\IndonusaCI\application\controllers\admin\site.php on line 10 That's the error.
[eluser]xtremer360[/eluser]
For some reason it all stems right now on saying that your model is not loaded. So can you show the line that you have the autoload file in the models array..
[eluser]davy_yg[/eluser]
Now, I get my site_model loaded correctly. After getting all the form filled-in and I press submit, I wonder why I start going to this url: http://localhost/IndonusaCI/index.php?site/create Instead of processing the data in the form and nothing else happen.
[eluser]Tpojka[/eluser]
Can't be told because we don't have view file to say. Update post again with all relevant files. And yes, modes should be named with lower case (small letter).
[eluser]davy_yg[/eluser]
Here is the view file. The rest remains the same. views/options_view.php Code: <!DOCTYPE html>
[eluser]Tpojka[/eluser]
Try with: Code: function create()
[eluser]davy_yg[/eluser]
ok I tried that and the result remains the same. It brings me to this url after I press submit: http://localhost/IndonusaCI/index.php?site/create
[eluser]davy_yg[/eluser]
I have done the tutorial CI series and it works. I wonder why this one doesn't work.
[eluser]Tpojka[/eluser]
You have to learn it from scratch. It is bad practice skipping steps in learning. You could see it now. I am glad you made it. |
Welcome Guest, Not a member yet? Register Sign In |