CodeIgniter Forums
source code for tutorial videos? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: source code for tutorial videos? (/showthread.php?tid=33860)



source code for tutorial videos? - El Forum - 09-10-2010

[eluser]Unknown[/eluser]
Are the source files for the tutorial videos available anywhere?

I've watched them a couple times and I'm pretty sure I did not make any typos but I keep getting a database error (You must use the "set" method to update an entry) when I submit a new comment. It's as though the _POST data remains empty from the comment_insert() function's perspective. I added "print_r($_POST);" to the comment_insert() function and all I see as output is "Array()".

I created some dummy data in comment_insert() and was able to insert data into my database using $this->db->insert() so it's not a db connection or rights issue. I loaded some test date in my tables via phpMyAmin and the data shows up correctly when I run the app. I just cannot get the _POST data from comment_view.php to comments().

Any help would greatly be appreciated.


source code for tutorial videos? - El Forum - 09-10-2010

[eluser]Unknown[/eluser]
OK, I figured it out. My 'base_url' setting in config.php did not have "www." prepended.

$config['base_url'] = "http://mysite.com/";

changed to

$config['base_url'] = "http://www.mysite.com/";

did the trick. Hope this can help someone else.


source code for tutorial videos? - El Forum - 12-29-2010

[eluser]gentleJuggernaut[/eluser]
Thanks acenoface. I kept getting an error on the scaffolding (the set method error). This did the trick. Anybody know why?


source code for tutorial videos? - El Forum - 12-29-2010

[eluser]Eric Barnes[/eluser]
Scaffolding has been deprecated for a while now and it will be removed in 2.0. So it is best to just not use it at all.