Method attributes used while submitting forms - HTML

Q.  What are the two method attributes that are used while submitting the forms?
- Published on 27 Aug 15

a. GET
b. POST
c. SUBMIT
d. Both A & B

ANSWER: Both A & B
 

    Discussion

  • Nirja Shah   -Posted on 09 Nov 15
    - The HTML form uses two methods in a form:

    GET method
    - This method sends the form data as URL variables.

    - Some key points to remember for this method are:

    1. It appends the form-data into the URL in name/value pairs

    2. The URL length is limited (about 3000 characters)

    3. Never use this method to send sensitive data! (as it will be visible in the URL)

    4. It can be used to submit a form where a user wants to bookmark the result.

    5. It is a good method for the non secure data like the query strings used in google.

    POST method
    - This method is used as a HTTP post transaction.

    - Some key points to remember for this method are:

    1. It appends the form-data inside the body of the HTTP request (data is not shown in URL)

    2. This method has no size limitations

    3. Form submissions with POST cannot be bookmarked

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)