help passing runtime variables through cgi obfuscation script

Brent Wood <[email protected]>
Newsgroups gmane.comp.gis.mapserver.user
Message-ID <[email protected]>
Hi,
I hope this makes sense...
I'm using simple shell CGI scripts to avoid passing the mapfile name in the service URL, eg:
http://..../cgi-bin/species       with the species CGI script containing: 
#!/bin/bash
export MS_MAPFILE=/usr/lib/cgi-bin/mapfiles/species_enhancedsearch.map
/usr/lib/cgi-bin/mapserv
I can use this approach to get the value of the variable passed in the URL:species_code=`echo "$QUERY_STRING" | sed -n 's/^.*species_code=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"`

If I have a mapfile which uses runtime substitution to set a value in an SQL in the DATA statement:
... where c.species='%species_code%' ...
How do I pass this value to mapserver from the obfuscating script?

Thanks,
   Brent Wood

_______________________________________________
mapserver-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.