O'Reilly logo

CodeIgniter for Rapid PHP Application Development by David Upton

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

Chapter 5. Simplifying HTML Pages and Forms

This chapter covers yet another way in which CI helps save your time and make your coding more rigorous and logical.

Firstly, we'll cover various ways of building views the pages that control how you see the results prepared by your controllers and models.

Next, you'll see how to create HTML forms quickly, and with built-in safeguards; and you'll also see how to validate your forms.

I'm assuming that readers of this book are familiar with HTML and CSS. The following examples are very simplified, so we can focus on the CI code. And I have assumed that we have already written a CSS file and tucked it away somewhere on our site.

Writing a View

Views control how the user sees your website. They make it easy for ...

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