in reply to cgi problem
Instead of typing all that HTML markup yourself, why not just let CGI.pm do it for you? :) I do applaud you for using Taint mode, by the way ... also, take a look at HTML::Template to keep your HTML out of your Perl code.#!/usr/bin/perl -T use strict; use warnings; use CGI qw(:standard); print header, start_html('Test CGI'), start_form, 'Company Name ', textfield('company'), br, 'Last Name ', textfield('last'), br, 'First Name ', textfield('first'), br, 'Serial Number ', textfield('serial'), br, 'Meter Reading ', textfield('meter'), br, submit('Submit'), end_form, ; if (param('Submit')) { my $company = param('company'); my $last = param('last'); my $first = param('first'); my $serial = param('serial'); my $meter = param('meter'); print hr, h3('You Entered'), pre(" COMPANY: $company LAST: $last FIRST: $first SERIAL: $serial METER: $meter "), ; } print end_html;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (jeffa) Re: cgi problem
by Anonymous Monk on Dec 23, 2002 at 01:21 UTC | |
by jeffa (Bishop) on Dec 23, 2002 at 01:48 UTC |