In the past two Gearhead columns, we began to explore the question: "How does a Web server application get data from a form?" This week, we'll wrap it up.
The first week we covered what goes on in an HTTP transaction, and last week we discussed the mechanism of a GET request:
GET /cgi-bin/myapp.pl?search= Gearhead%20columns&hits=10 HTTP/1.0User-Agent: xxxxxxAccept: image/gif, image/jpeg, */*But last week we made a mistake: The form we showed that was supposed to generate the above request was missing the ACTION (the program we want to run -- if you spotted this, award yourself a point). The form should have read:
To overcome this restriction, the POST method is available. To use it with the above form, the first line defining the form should read: