CodeIgniter Forums
Is My View Page Web Safe? - 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: Is My View Page Web Safe? (/showthread.php?tid=29680)



Is My View Page Web Safe? - El Forum - 04-17-2010

[eluser]01010011[/eluser]
Hi,
I'm new to web development and I'm building my first website using CI and want to make sure that I am following the MVC philosophy correctly.

Attached is a simple view page and was wondering whether or not some of this code should be put in the controller instead. Thanks in advance.


Is My View Page Web Safe? - El Forum - 04-17-2010

[eluser]cahva[/eluser]
In my opinion, no. You are just using basic url and form helpers so there is no need to move anything to controller. Ofcourse if you want to simplify your view, you could set up the input arrays etc. in controller and pass them to the view. But thats just beautifying and not necessary Wink


Is My View Page Web Safe? - El Forum - 04-17-2010

[eluser]01010011[/eluser]
Thanks for your reply cahva. I will still take your advise and clean up the view by setting up the input array in the controller.

[quote author="cahva" date="1271569413"]In my opinion, no. You are just using basic url and form helpers so there is no need to move anything to controller. Ofcourse if you want to simplify your view, you could set up the input arrays etc. in controller and pass them to the view. But thats just beautifying and not necessary Wink[/quote]