In the previous tutorial we learned how to use cookies so
that page views from the webmaster would not be tallied on
the count file. We wrote a simple program that the
webmaster could execute over the web to set a cookie. When
a page view happened the count program looked for this
cookie and if it found it the page view wasn't tallied.
This was a very simple example of a web transaction, i.e.
the program to set the cookie, which interacts with the
count program. In this article we will develop a more
complicated type of interaction between two programs, using
an HTML form to collect the data and put the results on
server files. Then another program will read those files
when needed and create its output according to what has
been specified in them.
So the technique we'll be learning is how to handle forms
from a web page. The application we'll be using this
technique for is preparing responses to server errors.
Eh?
Here's what I'm talking about. Right now, open another
browser window and go to a page on your site that doesn't
exist. For instance, if your homepage is at
http://www.mydomain.com/, type in
http://www.mydomain.com/not-there/. You'll likely get
a response like