JavaDeploy
SiteMap
Perl 1
Perl 2
ASP
XML
CGI Forms
«Prev
Web Perl
Web Server Basics
Http Protocol
Perl Basics
Perl Web Language
Perl Brief History
Compiled vs. Interpreted
Perl Language
Cross Platform Availability
Awk Sed Perl Text
Perl Regex
Pattern Matching
Powerful Pattern Matching
Regexp Substitute Operator
Execute Replacement Component
Aggregate Data Types
Perl Array
Perl Hash
Array hash Association
Perl References
Scalar References
Array References
Hash References
Perl Data Structure
Perl Web Programming
CGI Forms
About Web Forms
Passing Data Server
Server CGI Program
Get post Methods
Form Data encoding
Perl Widgets
Perl Form Conclusion
Perl CGI
Perl Program Flow
State Machine Model
Perl SM Example
Perl based HTML
CGI State Machine Model
Processing States using CGI
Perl Guestboook
Identify Perl Cookie Functionality
Set Read Cookies
Expire Perl Cookie
Clearing Perl Cookie State
Perl Interfaces Conclusion
Pipes Streams
Perl Stream
Write File Stream
Reading File Streams
Perl Pipe
Send email
email Form
Streams | Pipes
Simple Form Perl - Exercise
A Simple CGI Forms Example
Test an example of an HTML form and corresponding CGI program on your server.
For this exercise, you will want to reference the formtest.html and formtest.cgi files you have already downloaded (right :>) from the Resources page. First, make an HTML file like formtest.html, and put it on your server. When you load it with your browser, you should see something like this:
Perl CGI Form
Remember to change the name in the form's
ACTION
attribute to point to the correct URL for the CGI program on your server.
What CGI program? Now make a Perl program like formtest.cgi, and load it in your server at the proper location for running CGI programs. Load up your browser and fill in the form. When you press the submit button, you should see something like this:
Response page from form submission
Experiment with the form until you are satisfied that you understand the HTML (the CGI will come later). Then, click the
Submit
button.