How CGI Works
By Will Bontrager2003-06-09
So, how about a real-world example?
One of the most broadly useful CGI scripts is one that processes data from a feedback/contact web page form.
The example uses our own Master Feedback, available at
http://willmaster.com/a/6/pl.pl?64art
A web page is in your browser. The page contains a form.
You fill in the form and click the submit button.
The browser copies the information you provided on the form, along with the name of the CGI program that will process the information (in this case, Master Feedback).
The browser sends the information to the remote computer's server. (Your browser doesn't make decisions about what to do with the information. Everything just gets sent to the server. The server then makes the decisions.)
The server looks at the information your browser sent and decides what to do with it. In this case, it makes the information available to Master Feedback.
In between the time when your browser sends the information to the server and the time it hears back from the server,
Master Feedback:
1. Accepts the information from the server.
2. Mails the form contents to the appropriate email
address.
3. Gives the server the URL of a "thank you" page.
The server accepts the URL from Master Form and gives it to your browser. Your browser goes to that URL -- which means the next page you see is a "thank you" page.
That's the complete CGI cycle :)
Tutorial Pages:
» How CGI Works
» So, how about a real-world example?
Copyright 2004 Bontrager Connection, LLC
| Related Tutorials: » Random subroutines in Perl » Log Script Use » Creating Perl Modules for Web Sites » Bit Vector, Using Perl Vec » Build a Perl/CGI Voting System » Perl Range Operator |
