next up previous
Next: The Other Side Up: CGI Script Input: Accepting Previous: Passing Data to a

A Simple Form CGI Script Call

Let us now return to our minimal form example introduced previously and examine how the input is passed to a CGI script. We will then examine how the actual CGI script receives and processes the input data.

Recall the form simply has a single Text entry field and a submit button:

Data:

If we set the Form method attribute to GET via:

<form method = "get" action = "minimal.cgi">
<input type="submit">Data: <input name="myfield">
</form>

If you enter some data in the Text field and click on submit then the call to the CGI script looks something like

http://myhost/minimal.cgi?myfield=dddd

where minimal.cgi is the CGI script actioned by the form,

Try this for yourself self by either entering data in the above form. If you want to call the CGI script yourself (by passing the Form) you simply mimic to input above.

Try typing:

http://www.cs.cf.ac.uk/User-bin/
Dave.Marshall/minimal.pl?myfield=mydata

in the Netscape location bar.

Or call is directly form here: