A Short Form Element Demonstration

Let’s write a short script, elt_demo.pl, that shows how to use the material discussed in the earlier part of this chapter.The script is simple but does several things:

  • It generates a form that includes an instance of each type of element we’ve discussed so far. You can select or fill in elements and then submit the form.

  • The script is self-referential; it not only generates the form, it also processes it by causing itself to be invoked when you select the Submit button.

  • elt_demo.pl examines its CGI environment using param() to determine whether information for a submitted form is present. If so, it extracts and displays that information to enable you to see how various types of fields are received by the Web ...

Get MySQL and Perl for the Web 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.