Welcome Guest, Not a member yet? Register   Sign In
Is My View Page Web Safe?
#1

[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.
#2

[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
#3

[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]




Theme © iAndrew 2016 - Forum software by © MyBB