#!/bin/sh # # Script to put its arguments into an HTML table that has one pair of # attribute-value pairs per row. # # A back button is included so users can back up to the sending form. echo Content-type: text/html echo gawk -F'&' '{ print "" print "

Form was submitted

" print "The server would receive the following data.
" print "The odd columns are the field names.
" print "The even columns (boldface) are the values in the fields
" print "" gsub(/%40/,"@") gsub(/+/, " ") for (x = 1; x <= NF; x++) { # Re-split to get and attribute-value pair split($x, data, "="); print "" x++; # Repeat for second pair in the row if (x <= NF) { split($x, data, "="); print "" } print "" } print "
" data[1] "" data[2] "" data[1] "" data[2] "
" print "
" print "
" print "" print "

Warning: The script is not bullet proofed wrt to special characters.
" print "Special characters may not appear as expected.
" print "To write a correct script, you will have to become familiar with the scripting
" print "language and with the actual characters that are received by the script
" print "For example the character @ is received as %40 by this cgi script and
" print "the space character " " is received as the character \"+\"." print "
" print "" }'