Data-Entry Forms in Web Pages
<html>
<body>
<FORM METHOD="POST" ACTION="index.cgi">
<H2>Customer Order Tracking</H2>
Enter order number:
<INPUT NAME="orderno">
<p>
<INPUT TYPE="submit" VALUE="Look up">
</FORM>
</body>
</html>
#!/usr/bin/perl -w
# CGI script using CGI.pm module.
use CGI;
$form = CGI->new();
$orderno = $form->param('orderno');
print $form->header();
print $form->start_html(-title=>'Customer Order Tracking',-BGCOLOR=>'white');
print "<h1>Your Order Number</h1>\n";
print "Your order number was: $orderno.\n";
print "<p>\n"; # Paragraph
# End HTML form.
print $form->end_html();
Related examples in the same category