previous | start | next

Form submission using GET

Here is a typical HTML form which you can use to enter some random data. When you click on the Submit button, you should pay close attention to two things:
  1. Notice that the form data is appended to the URL, in URL-encoded form as described above.
     
  2. The server's response (generated by a trivial CGI program on ironbark) shows the complete "QUERY_STRING" which was passed to it. Notice that it's exactly the same as the information which was "tacked onto" the URL after the ? character.

 
The HTML for our FORM looks like:
<FORM action="/subjects/int21cn/cgi/L06CGIa.cgi" method="GET">
info1: <INPUT type="text" name="info1" size="20"><br>
info2: <INPUT type="text" name="info2" size="20"><br>
<input type="submit" value="Submit">
<input type="reset" value="Clear Form">
</FORM>
This is rendered in your Web browser as:
 
info1:
info2:

 
Try it!
 
Lecture 06: Applications #3.2: HTTP Copyright © 2003 P.Scott, La Trobe University Bendigo.



previous | start | next