Chapter 3

HTML5 Forms


check Creating a data form

check Examining the form fields

check Looking at additions to HTML5

check Validating forms

Quite possibly one of the most common ways that PHP programming helps is by processing data entered into an HTML5 form. There are plenty of applications that require data entry — from keeping track of your bowling team to filling out online job applications. HTML forms have been around for a long time, and with HTML5 it’s sure to stick around for years to come. This chapter shows you how to create forms for your web applications using the HTML5 form features.

Understanding HTML5 Forms

A dynamic web application requires some type of interaction with the site visitors who use it. That interaction is usually done with a form. Forms allow you to ask your site visitor for information using many of the same input interfaces that are commonly found in Windows and macOS systems, such as text boxes, drop-down lists, and radio buttons.

Before you can create a form for your web application, you need to do some housekeeping for HTML5. You need to define the form ...

Get PHP, MySQL, & JavaScript All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.