Then from your browser, open the file to see what the form looks like. It should look like this:

Reading the form data from your shell script is a bit more tricky. You will probably have encountered html pages that look like http://www.someaddress.com/somescript.cgi?param1=value1¶m2=value2
value1 and value2 are the parameters that your HTML form has submitted when you hit the submit button (assuming your form only has 2 parameters).
To read them in your c-shell cgi script, use
set input = $<>param1=value1¶m2=value2)
so then you will have to split the string and read the parameters individually in different variables:
set param1 = `echo $input | cut -d '&' -f1 | cut -d '=' -f2`
and the same for param2.
No comments:
Post a Comment