cgi to dump xml data from form input field
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,
At the end the cgi should return a html saying that "Data saved."
<input type="button" id="btnSave" value="Save" onclick="saveXmlData()"/>
<form name="submitForm" action="./saveData.cgi" method="get">
<input type="hidden" name="xmldata" />
I have never written cgi. I would appreciate if you can guide me resolvethis or point me out some article, sample or other link.