I am new to codeigniter and I have just created a test login system. Chuffed…
I would like to make a form for this login system as I have just been passing the username/password directly for testing.
I am trying to work out the benefits of using the form helper. It helps me contsruct a form easily but can I not do this in just pure html? Is there another benefit of the form helper – I am just talking about the part that creates the form and not the validation – I am guessing I can use the validation regardless of how the form was created?
Thanks all
The form helper exists to give you programmatic-control over your form. Yes, you could write it in HTML, but then you’ll find yourself inserting PHP into your HTML when you want to auto-populate fields that need to persist between submissions and other similar stuff that is common to forms. Using this helper will keep your logic in the controller, and out of your views as much as possible.
By the way, good choice learning MVC!