Cgi to dump xml data from form input field


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Cgi to dump xml data from form input field
# 1  
Old 06-19-2013
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

Last edited by jdp; 06-19-2013 at 07:52 PM..
# 2  
Old 06-20-2013
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Web Development

Php help to copy form field if empty

I have an input form with several fields. What I would like to achieve is to auto populate or copy certain fields if they are empty when the form is submitted. I would like to use php if not then javascript but not jquery if possible - I have sort of had a go but I really have no idea... (4 Replies)
Discussion started by: barrydocks
4 Replies

2. Programming

Field delimited data to XML

Hi, We need to produce a XML file based on a record/field delimited data file. At this point we could just script something out but I would like to ask the community what would be the best choice of programming language to do this, in terms of performance of execution, and in terms of complexity... (9 Replies)
Discussion started by: Indalecio
9 Replies

3. Shell Programming and Scripting

Transpose Data form Different form

HI Guys, I have data in File A.txt RL03 RL03_A_1 RL03_B_1 RL03_C_1 RL03 -119.8 -119.5 -119.5 RL07 RL07_A_1 RL07_B_1 RL07_C_1 RL07 -119.3 -119.5 -119.5 RL15 RL15_A_1 RL15_C_1 RL15 -120.5 -119.4 RL16... (2 Replies)
Discussion started by: asavaliya
2 Replies

4. Shell Programming and Scripting

Converting form field to table format

May data Name = Andi Address = none Phone = 82728 Name = Peter Address = none Phone = 98799 The expected output Name,Address,Phone Andi,none,82728 Peter,none,98799 what i have done (6 Replies)
Discussion started by: before4
6 Replies

5. Web Development

in cgi perl script a form

hi,i hav a form in cgi perl script.this script accepts a value from user from another html form, and depending upon this value,i need to disable /enable radio buttons in cgi-perl script wen second page is displayed on executing cgi perl script.how do i do it using javascript? (0 Replies)
Discussion started by: raksha.s
0 Replies

6. Shell Programming and Scripting

convert one form of xml data to other

I would like to convert one form of xml tag data to another <DescriptionList> <DescriptionExt language="en" shortDesc="ITALIAN SAUSAGE SUB" longDesc="" sizeDesc="" smallImage="Pictures\sub-italian-sausage.png" largeImage="" forceImageUpdate="yes" /> ... (1 Reply)
Discussion started by: saisus
1 Replies

7. Shell Programming and Scripting

perl cgi form action target

Hello All, I was trying to come up with a form using perl cgi. I then created a frame to show the output of the form. Refer below print $display_form->start_form(-title=>"Updateuser", -style => 'font-size: 9pt; color: #202020 ; font-family: Verdana', action=>"${DOCROOT}updateUser.pl",... (4 Replies)
Discussion started by: garric
4 Replies

8. Shell Programming and Scripting

HTML form to cgi help

I wrote a script to automate user account verification against peoplesoft. Now I want to make it available to my peers via the web. It is running on Solaris. I have the form written, but am not sure how to make it work. I think the form should call a perl cgi when submitted. The cgi should call... (7 Replies)
Discussion started by: 98_1LE
7 Replies

9. UNIX for Advanced & Expert Users

Weakness in Perl CGI causes memory dump ??

I have discovered a curious phenomenon in GCI. I need some advice from someone far more adept. Is this a bug or potential security weakness? Context: Redhat 8.0 on xx86 (pentium 3) Apache 2.0, Perl 5.80 Background: I've been trying to harden a web application which accepts user uploaded... (0 Replies)
Discussion started by: andyj
0 Replies
Login or Register to Ask a Question