#!/usr/bin/perl -w
use CGI qw/:standard :html3/;
my $q = new CGI;
my $var = "100";
print
$q->header( -type=>'text/html'),
$q->start_html(),
$q->start_form(-method=>'post',
-action=>"another.cgi"),
"Enter Item Number: ",
$q->textfield(-name=>'var_data', -size=>'6',
-value=>"$variable"),
$q->end_form,
$q->end_html;
exit;
This will put data in the textfield and will allow the user to edit it before moving onto the next script (another.cgi). Note, the commas, semi-colons, quotes, and double-quotes are not arbitrary. You also need to have the CGI perl module installed on your server--I don't think it's standard issue with Perl.
That's Spenser, with an "s" like the detective. |