![]() |
Weird problem.. - 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: Weird problem.. (/showthread.php?tid=20710) |
Weird problem.. - El Forum - 07-19-2009 [eluser]Gijs Bloemen[/eluser] Hi all, I have a controller with the next in it (without the comment lines... And do also not say that some things have a bad security, I know but this is just a prototype of te script): Code: <?php When I load it I got the next errors: Quote:A PHP Error was encountered Quote:A PHP Error was encountered Quote:A PHP Error was encountered Yesterday I got with exactly the same controller no problems.. Does someone know why I got it now and yesterday not? Regards, Gijs Bloemen Weird problem.. - El Forum - 07-19-2009 [eluser]Johan André[/eluser] You get the first two errors because the $data-array does not have any keys named "title" and "mededling". You need to do $data = array(); before assigning anything to it. The last error is because you outputted something (in this case the errors) before setting the headers. If you fix the first two the last error will not show... Also, I would recommend naming your controllers and variables in english since it's much easier to understand your code (when you ask for help). Ofcourse it does not affect the function at all... ![]() |