HTML and CSS Reference
In-Depth Information Using unnamed parameters with GET applications
Unnamed parameters get passed to the application as command-line
parameters. This makes writing the server-side application almost trivi-
al. Here is a simple shell script that dumps the parameter values back
to the user:
#!/bin/csh -f
# Dump unnamed GET parameters back to the user
echo "Content-type: text/html" echo
echo '<html>'
echo '<head>'
echo '<title>Unnamed Parameter Echo</title>'
echo '</head>'
echo '<body>'
echo 'You entered the following parameters:'
echo '<ul>'
foreach i ($*)
echo '<li>' $i
echo '</ul>'
echo '</body>'
exit 0
Again, we follow the same general style: output a generic document
header, including the MIME Content-Type , followed by the parameters
and some closing boilerplate. To convert this to a real application, re-
place the foreach loop with commands that actually do something.
Search WWH ::

Custom Search