![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a neophyte question regarding what really gets sent out once I click a submit button in a form. For example, (http://www.webcom.com/~webcom/html/t...ms/start.shtml) FORM METHOD=POST ACTION="http://www.webcom.com/cgi-bin/form" Enter your name: INPUT NAME=your_name INPUT TYPE=submit VALUE="Test this form" /FORM Suppose I enter "John" into the name field and click on the button, what exactly is the text that gets sent back to the server? I tried "http://www.webcom.com/cgi-bin/form?John", but the server returns an error message. I'd like to the correct syntax for this. |
|
Also, in the case where a form contains multiple text fields, radio buttons, drop lists, etc, what is the syntax for encoding all these input that's submitted to the server? |
|
A link to an on-line tutorial would be appreciated. |
#3
| |||
| |||
|
|
A link to an on-line tutorial would be appreciated. http://www.google.com/ |
#4
| |||
| |||
|
|
In article <MPG.1a0dcf74c0c22fd39897b1 (AT) news (DOT) individual.net> in comp.infosystems.www.authoring.html, Hywel Jenkins hyweljenkins (AT) hotmail (DOT) com> wrote: A link to an on-line tutorial would be appreciated. http://www.google.com/ That's like saying "Library of Congress" when someone asks you to recommend a book on the life and times of Gladstone. |
#5
| |||
| |||
|
|
FORM METHOD=POST ACTION="http://www.webcom.com/cgi-bin/form" Enter your name: INPUT NAME=your_name INPUT TYPE=submit VALUE="Test this form" /FORM Suppose I enter "John" into the name field and click on the button, what exactly is the text that gets sent back to the server? I tried "http://www.webcom.com/cgi-bin/form?John", but the server returns an error message. I'd like to the correct syntax for this. |
|
Also, in the case where a form contains multiple text fields, radio buttons, drop lists, etc, what is the syntax for encoding all these input that's submitted to the server? |
#6
| |||
| |||
|
|
label><input name="spam2" type="checkbox" Sell my details to <strong>evil</strong> spammers</label><br /fieldset /form |
#7
| |||
| |||
|
|
In article <MPG.1a0dcf74c0c22fd39897b1 (AT) news (DOT) individual.net> in comp.infosystems.www.authoring.html, Hywel Jenkins hyweljenkins (AT) hotmail (DOT) com> wrote: A link to an on-line tutorial would be appreciated. http://www.google.com/ That's like saying "Library of Congress" when someone asks you to recommend a book on the life and times of Gladstone. |
#8
| |||
| |||
|
|
In article <MPG.1a0d9440ef48b7fe98b677 (AT) news (DOT) odyssey.net>, the_stan_brown (AT) fastmail (DOT) fm says... In article <MPG.1a0dcf74c0c22fd39897b1 (AT) news (DOT) individual.net> in comp.infosystems.www.authoring.html, Hywel Jenkins hyweljenkins (AT) hotmail (DOT) com> wrote: A link to an on-line tutorial would be appreciated. http://www.google.com/ That's like saying "Library of Congress" when someone asks you to recommend a book on the life and times of Gladstone. With Google, however, you can show the smallest hint of common sense and type "form tutorial" and get pretty much straight to what you need, same if you search for "life and times of Gladstone". |
#9
| |||
| |||
|
|
John Smith wrote: FORM METHOD=POST ACTION="http://www.webcom.com/cgi-bin/form" Enter your name: INPUT NAME=your_name INPUT TYPE=submit VALUE="Test this form" /FORM Suppose I enter "John" into the name field and click on the button, what exactly is the text that gets sent back to the server? I tried "http://www.webcom.com/cgi-bin/form?John", but the server returns an error message. I'd like to the correct syntax for this. If it were a GET request (rather than a POST request) it would look like this: http://www.webcom.com/cgi-bin/form?your_name=John But POST requests are different. The variables aren't tacked onto the URL and are sent by other means. Find an HTTP tutorial for more details. |
|
Also, in the case where a form contains multiple text fields, radio buttons, drop lists, etc, what is the syntax for encoding all these input that's submitted to the server? Consider the following form: form action="myscript.cgi" method="GET" fieldset legend>Personal Details</legend label><input name="name1"> Given Name</label><br label><input name="name2"> Family Name</label><br label><input name="sex" value="m" type="radio" checked="checked" Male</label label><input name="sex" value="f" type="radio"> Female</label><br label select name="age" option value="range1">Under 18</option option value="range2">18-25</option option value="range3">26-35</option option value="range4">36-49</option option value="range5">50+</option /select Age /label><br label><input name="spam1" checked="checked" type="checkbox" Sell my details to spammers</label><br label><input name="spam2" type="checkbox" Sell my details to <strong>evil</strong> spammers</label><br /fieldset /form If I fill in my name, choose "Male" from the radio buttons, choose my age (I'm 23) and leave the checkboxes as they are, the following URL will be submitted: myscript.cgi?name1=Toby&name2=Inkster&sex=m&age=ra nge2&spam1=on Note: no "spam2=off" is submitted. |
#10
| |||
| |||
|
|
I briefly looked up the dif between "get" and "post", it seems that the latter doesn't encode submission in url form, which begs the question: how does it send data anyway? what data does it actually send? in encrypted form? do the data fromat differs from one form from another depending on the specific implementation of the programmer? Can one glean some hints by examining the html code of the submission page? |
|
The reason I'm interested is that I'm curious about if it's possible to automate the submission process by directly sending requests to the remote server so that no human is needed to click the "submit" button for every submission. It'd be very neat if I can do this even with forms using "post". |
![]() |
| Thread Tools | |
| Display Modes | |
| |