home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book Home Programming PerlSearch this book

32.4. CGI

use CGI qw(:standard);
$who   = param("Name");
$phone = param("Number");
@picks = param("Choices");

The CGI module helps manage HTML forms, especially multistage forms where passing state from one stage to another is critical. The extremely simple example above expects to process a form with two parameters that take single values, such as text fields or radio buttons, and one that takes multiple values, like scrolling lists specified as "MULTIPLE". The module is several orders of magnitude fancier than this, supporting such features as convenient cookie processing, persistent values for multiscreen shopping carts, and dynamic generation of HTML lists and tables you might pull from a database--just to name a few. Support for turbo-charged execution of precompiled Perl scripts through Apache's mod_perl facility is also provided. The O'Reilly book Writing Apache Modules with Perl and C, by Lincoln Stein and Doug MacEachern, can tell you all about this.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.