Basic Tutorial Help |
News Section tutorial I am working on. Can display news items manually input into the database, but can not add items through the Create form:
News.php Code: <?php News_model.php Code: <?php create.php (in the views/news folder) Code: <h2><?php echo $title; ?></h2> routes.php (changes from tutorial) Code: <?php All I get is a blank page when trying to insert a new record. I can manually add news items to the database through phpMyAdmin but not through the Create form! Here is the error as it is not connecting to the database: http://www.screencast.com/t/8NFaonzVBvW Thanks for your help! Update: It was the config base_url, and now is inserting data into the database via the create.php file, but the success message has an error I need to try and fix. I kind of figured it was something simple. Now to see if I can fix the new error. When or if I figure this one out, I'll let you know. Success Error: http://www.screencast.com/t/VASIK9juls All done. It helps if you include the success.php file. Everything working now. It's the little obvious things that always get me, having the wrong database name in the database.php file, not realizing the future code in the tutorial goes inside of the controller or model code, NOT below it. Not having the correct base_url in the config file, and not putting the success.php file in the views/news/ folder. Now to style it and see if I can come up with some changes to make my own. Thanks and good luck everyone new to PHP and CodeIgniter like I am. |
Messages In This Thread |
Basic Tutorial Help - by in2tech - 12-27-2016, 11:59 PM
RE: Basic Tutorial Help - by InsiteFX - 12-28-2016, 05:52 AM
RE: Basic Tutorial Help - by in2tech - 12-28-2016, 10:49 AM
RE: Basic Tutorial Help - by InsiteFX - 12-29-2016, 04:37 AM
RE: Basic Tutorial Help - by in2tech - 12-30-2016, 12:23 AM
RE: Basic Tutorial Help - by in2tech - 12-31-2016, 01:45 PM
RE: Basic Tutorial Help - by InsiteFX - 01-01-2017, 03:23 AM
|