CGI scripts; passing variables

John Price-Wilkin (jpw@jpw-slip1.lib.virginia.edu)
Mon, 9 May 94 21:44:27 -0400


I apologize if this is an inappropriate place to raise this question,
but I seem to be having problems passing a couple of shell variables in
a CGI script. Everything works fine for X-Windows Mosaic, but one
variable gets dropped in queries from both lynx and MS-Windows Mosaic.
They run something like this:

case $QS_bool in
and) OPT_bool="^" ;;
or) OPT_bool="+" ;;
not) OPT_bool="-" ;;
*) OPT_bool="^" ;;
esac

case $QS_docs in
page) OPT_docs="page" ;;
stanza) OPT_docs="stanza" ;;
poem) OPT_docs="poem" ;;
*) OPT_docs="page" ;;
esac

case $QS_size in
1-10) OPT_size='subset' ;;
11-20) OPT_size='subset.11' ;;
21-30) OPT_size='subset.21' ;;
31-40) OPT_size='subset.31' ;;
(last one shortened for this example)
esac

The OPT_docs values are gone when searches are sent to the server. (I
capture the results of the query in an intermediate file, so have a good
idea what's being received.) Does this owe to my ignorance in shell
programming, or deficiencies in FORMS recognition by some clients?