CGI scripts; passing variables

John Price-Wilkin <jpw@jpw-slip1.lib.virginia.edu>
Errors-To: listmaster@www0.cern.ch
Date: Tue, 10 May 1994 03:45:39 +0200
Errors-To: listmaster@www0.cern.ch
Message-id: <9405100144.AA00326@jpw-slip1.lib.Virginia.edu>
Errors-To: listmaster@www0.cern.ch
Reply-To: jpw@jpw-slip1.lib.virginia.edu
Originator: www-talk@info.cern.ch
Sender: www-talk@www0.cern.ch
Precedence: bulk
From: John Price-Wilkin <jpw@jpw-slip1.lib.virginia.edu>
To: Multiple recipients of list <www-talk@www0.cern.ch>
Subject: CGI scripts; passing variables
X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas
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?