O'Reilly logo

CodeIgniter 1.7 by David Upton, Jose Argudo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CI's form helper—entering data

Let's move on to see how you use your HTML pages. One of the most important parts of any dynamic site is interaction with the users, and this usually means HTML forms.

The CI form helper is a very useful piece of code. It introduces a slightly different syntax, which makes form creation easier. Let's build a form that allows you to enter data on your site about a new website. In the sites table, we want to enter the name, type, and URL of the website, and the date when it was updated.

You can build the form as a simple HTML file, or you can build it inside a controller, then pack it into a variable, call a view, and pass the variable to the view. We will do it the second way. You can also write it entirely in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required