Click to See Complete Forum and Search --> : get and post method


July 9th, 1999, 03:49 AM
what is the difference between "get" and "post" method in a form of html?

Lothar Haensler
July 9th, 1999, 04:42 AM
with GET all the parameters in your form are concatenated to the end of the URL (ever seen thos "?name=...&lastname=...&city=.." stuff?). That's why the stuff passedto the server is visible to the user in the address bar.
With POST the parameters are sent in a separate transaction.
The amount of data you can send with GET is limited, not so with POST.
POST is said to be slower as GET (because more transactions).

Dhwanit
July 9th, 1999, 05:28 AM
When seen from the angle of the web server receiving the get or post request, the get is sent as a single environment string separated by ampersands: variable=value&nextvariable=anothervalue&... so on. Since this would be a single environment string, it is limited to a max of 128 chars (on some servers upto 255). Anything above the limit will "choke" the webserver's thread handling the connection from the remote machine.

The post on the other hand generates separate environment variables for each item in the form. Assuming the "get" example above, you'll have environment strings like: variable=value and nextvariable=anothervalue which you'll read off in your CGI programs. There is no limit and there is no possibility of choking the webserver with too much data.


Cheers!
DP