GET and POST Methods
12
December
2012

There are two methods available in HTML for sending request from web page to web server. These are GET and POST methods and both work under HTTP (Hypertext Transfer Protocol). These methods are specified within FORM element using METHOD attribute. The default form submission method is GET. When a form is submitted using GET method then all the submitted data are visible in the action URL as query string values. These query string values are easily editable, so GET method is less secured. On the other hand, when a form is submitted using POST method then all the form data are submitted to the web sever securely without displaying action URL. So POST method is more secure than GET method.

Following code describes how to define a HTML form with GET and POST methods respectively.
1 // Form with GET method
2

3 .
4 .
5

6
7 // Form with POST method
8

9 .
10 .
11
  • 1407 View
  • Pin It
    Leave a Comment

    You must be logged in to post a comment.