How Forms Work

You've undoubtedly used forms on the Web, and you might even understand how they're laid out and how they work. Regardless, a review of HTML form basics is in order.

Short Review of HTML Form Elements

Before you jump into how a form works, you should review how HTML represents a form and the roles that all the elements in that form play.

By the Way

The HTML presented in this book should not be taken as a model of great HTML. Enough HTML is presented to demonstrate the CGI features needed, but not much else. There are generally no <head> or <body> tags shown, nor a <!DOCTYPE> in any of the HTML presented in the examples. In addition, the screens are quite plain. Feel free to add your own HTML to make the screens more attractive ...

Get SAMS Teach Yourself Perl in 24 Hours THIRD EDITION 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.