Cgi to dump xml data from form input field

Hi All,

I am trying to write a shell script which takes parse the web form find the input field and dump the data of that field into one xml file. The form looks like,

<input type="button" id="btnSave" value="Save" onclick="saveXmlData()"/>         
<form name="submitForm" action="./saveData.cgi" method="get">     
<input type="hidden" name="xmldata" /> 
</form> 

At the end the cgi should return a html saying that "Data saved."

I have never written cgi. I would appreciate if you can guide me resolvethis or point me out some article, sample or other link.

Thanks,
Jdp

CGI is pretty simple, and there are many tutorials. Esentially, all the GET form variables are in one environment variable, and POST is up to you to read. All manner of information is passed in environmental variables like the client host and port, what method, etc. Your job is to write the new html less the first line 200 OK to stdout. CGI does not care if you write in shell, PERL (well supported), executable JAVA jar or C/C++, but a non-zero exit will blow off the response. You can log on stderr. Google up a CGI tutorial.