So that your program remembers long, multipage Web transactions, you need to use
Some combination of hidden HTML form fields, cookies, and databases
Using an HTML <form> tag without an action attribute will
Cause the submit button to use the CGI program that originally generated the page
Cause the submit button to reload the current page
The survey program, as listed, has a small bug. What is it?
The HTML is not complete because it lacks <head> tags and such.
The survey doesn't print its results.
Either b or c. You can use just hidden HTML fields or just cookies. Using just a database won't quite work.
b. Reloading the current page would just erase all the current form answers. Without an action attribute, the <form> tag uses the URL of the current page for the submission URL.
b. print<<EOP; is certainly valid syntax, called a here document. Choice c is not correct because the program wasn't designed that way (see the "Activities" section).
Write a short CGI program to display the results of the survey program. Possibly build a table to display them like this:
For an additional challenge, write a CGI program to summarize the survey results like this:
Own that pet:
| || |
© 2000- NIV