Play the Market--win real cash! logo

internet.com
Join the free
WDVL newsletter!

home

Exercise Three

Exercise Three

  • Okay, let's try to use perl to print out an HTML form!

  • Here is the form you will try to output...

[Example]

  • Here is the code...

    #!/usr/local/bin/perl
    print "Content-type: text/html\n\n";
    print qq!
      <HTML>
      <HEAD>
      <TITLE>Testing Form Input</TITLE>
      </HEAD>
      <BODY>
      <FORM METHOD = "POST" ACTION = "fp.cgi">
      <CENTER>
      <TABLE BORDER = "1">
      <TR>
      <TH>First Name</TH>
      <TD><INPUT TYPE = "text" 
                    NAME = "f_name"></TD>
      </TR>
    
      <TR>
      <TH>Last Name</TH>
      <TD><INPUT TYPE = "text" 
                    NAME = "l_name"></TD>
      </TR>
    
      <TR>
      <TH>Email</TH>
      <TD><INPUT TYPE = "text" 
                    NAME = "email"></TD>
      </TR>
    
      </TABLE>
      <P>
      <INPUT TYPE = "SUBMIT">
      </CENTER>
      </FORM>
      </BODY>
      </HTML>!;
    

Formatting the Output
Table of Contents
Perl Scalars

Up to => Home / Authoring / Scripting / Tutorial

Instantly look up a "techie" word using Webopedia!!


internet.com
e-commerce
WebDeveloper Network


Live coverage of Fall Internet World '99!

Copyright 1999 internet.com Corporation. Legal Notices. Privacy Policy.

www.internet.com