HTML form methods GET and POST

HTML form methods GET and POST

What is the difference between the HTML form methods GET and POST?

View Answers

November 2, 2010 at 4:55 PM

Hi,

We can send data to the data processing page by both the GET and POST methods of a form. Both methods are used in form data handling where each one has some difference on the way they work. We will discuss some of the differences.

As you have seen there is a character restriction of 255 in the URL. This is mostly the old browsers restriction and new ones can handle more than that. But we can't be sure that all our visitors are using new browsers. So when we show a text area or a text box asking users to enter some data, then there will be a problem if more data is entered. This restriction is not there in POST method.

In GET method data gets transferred to the processing page in name value pairs through URL, so it is exposed and can be easily traced by visiting history pages of the browser. So any login details with password should never be posted by using GET method.

As the data transfers through address bar ( URL ) there are some restrictions in using space, some characters like ampersand ( & ) etc in the GET method of posting data. We have to take special care for encoding ( while sending ) and decoding ( while receiving ) data if such special characters are present.

There are some special cases where advantage of using GET method is , one can store the name value pairs as bookmark and directly use them by bypassing the form.

thanks.


November 2, 2010 at 4:55 PM

Hi,

We can send data to the data processing page by both the GET and POST methods of a form. Both methods are used in form data handling where each one has some difference on the way they work. We will discuss some of the differences.

As you have seen there is a character restriction of 255 in the URL. This is mostly the old browsers restriction and new ones can handle more than that. But we can't be sure that all our visitors are using new browsers. So when we show a text area or a text box asking users to enter some data, then there will be a problem if more data is entered. This restriction is not there in POST method.

In GET method data gets transferred to the processing page in name value pairs through URL, so it is exposed and can be easily traced by visiting history pages of the browser. So any login details with password should never be posted by using GET method.

As the data transfers through address bar ( URL ) there are some restrictions in using space, some characters like ampersand ( & ) etc in the GET method of posting data. We have to take special care for encoding ( while sending ) and decoding ( while receiving ) data if such special characters are present.

There are some special cases where advantage of using GET method is , one can store the name value pairs as bookmark and directly use them by bypassing the form.

thanks.









Related Tutorials/Questions & Answers:
HTML form methods GET and POST
HTML form methods GET and POST  What is the difference between the HTML form methods GET and POST
differences between GET and POST methods in form submit
differences between GET and POST methods in form submit  What are the differences between GET and POST methods in form submitting, give the case where we can use GET and we can use POST methods
Advertisements
GET and POST methods
GET and POST methods   What are the differences between GET and POST methods in form submitting, give the case where we can use GET and we can use POST methods
HTML Post Form
HTML Post Form      ... to send the form data in the form of message. The Post method in HTML is used... The Tutorial illustrates an example from HTML Post Form. In this Tutorial, the code explain
post get
post get  what is post and get
php form post to mysql
php form post to mysql  How to post data into mysql database from the PHP post data form
get and post
get and post  what is php and get   PHP get and post method
POST or GET
POST or GET  hello, Which will execute faster on php POST or GET?   hii,ADS_TO_REPLACE_1 The POST metod is much more faster then GET... no information is given to ULR that's why POST is faster then GET method
post get
post get  what is ajax
php $_GET and $_POST functions
php $_GET and $_POST functions:       PHP provides two special functions called $_GET & $_POST, this functions are used to get the values which are passed from a user-filled form, like user
POST AND GET METHOD - JSP-Servlet
POST AND GET METHOD  I AM LITTLE BIT CONFUSED IN GET() AND POST() METHODS. PLZ GIVE ME BREIF INTRODUCTION ABOUT THESE ??:)  Hi Friend...://www.roseindia.net/jsp/how-work-post.shtml http://www.roseindia.net/html/html-get
HTML Post Image
HTML Post Image       The Tutorial illustrates an example, how to post image in HTML... to get the picture ,that should be put on the html page.ADS_TO_REPLACE_1
PHP HTML forms and Post Method Code
HTML Code <HTML><BODY> <FORM METHOD=?POST...PHP HTML forms and Post Method Code PHP html function With the given PHP HTML... to create html forms and display data using PHP Post Method in PHP
Difference between GET and POST
Difference between GET and POST   Difference between GET and POST ?   The difference between a GET and a POST is the way data... or a POST is different too. If you use a GET, the method that is called is doGet
post ,get data in the database
post ,get data in the database  post ,get data in the database  Please visit the following links: PHP get post data PHP Tutorials
Post Method of the Form In JSP
Post Method of the Form In JSP   ... of the post method of the form in JSP. The HTTP post method sends data to the server from the HTML form elements. This method does not show the value of elements
HTML Form Validation example
HTML Form Validation example  Can anyone guide me how to validate the user name and password field in HTML using simple or JavaScript Validation. Thanks in advance!   <form method="post" onsubmit="return
how to post data in mysql php form
how to post data in mysql php form  how to post data in mysql php form
HTML Post Radio Button
HTML Post Radio Button       HTML Post attribute used in method, when a user is not able...; <form method = POST action ="get.html"> <input
HTML Form data into .CSV?
HTML Form data into .CSV?  how to store data from html form to csvfile in java
HTML form examples
HTML form examples  Hi, How to create a simple data entry form in HTML and use JavaScript to validate the same. Can anyone share html form examples...({});   Hi, Please see the HTML form example page. Thanks
Registration Form in HTML
Registration Form in HTML  User Registration Form in HTML - i wanted to design a user registration form in HTML. So, Can anyone please guide me or give me a peace of code to design a user registration form in HTML. Thanks
HTML to php form
HTML to php form  Hi, How I can submit the HTML form data to PHP Script? Give me example code. Thanks   Hi, Please see the following tutorials: PHP Form PHP email form Thanks
web form(html) with jdbc
web form(html) with jdbc  need a example coding to develop a web form of data with jdbc   Hi Friend, Try the following code: 1)form.html: <html> <form method="post" action="http://localhost:8080/examples/jsp
GET and POST Method of HTTP
GET  and POST Method of HTTP       GET The Get is one the simplest Http method. Its main job... then then it will given back to the user on your browser. That resource may be a HTML
How to create simple HTML Form?
? HTML Post Form HTML Code for registration form...HTML Form Tutorial: How to create simple HTML Form? In web application input forms are developed using the HTML tags and the form component provided
HTML -- form tag.
HTML -- form tag. Description : HTML provides a form tag. It takes user... within form tag. Code : <!DOCTYPE html PUBLIC "-//W3C//DTD... language</title> </head> <body> <h1>HTML form tag
html form - Java Beginners
html form  Hi, I wnt to design a form with more than one action in submit button.thanks. regards, sakthi  Hi friend, You specify your main requirement of form with more then one action. Thanks
HTML form - Java Beginners
HTML form   Hi, thank u for fast reply. I have two forms (form1 and form 2)with several fields in html. When i click the submit button, it validates all fields then moves to form2. i have a problem with form navigation. i
Process HTML FORM data
Process HTML FORM data  Can a JSP page process HTML FORM data?   Yes. Preemptive termination of request processing on an error condition is a good way to maximize the throughput of a high-volume JSP engine. The trick
create html form as follows
create html form as follows  a form that contains two textboxes;one for your name and another for telephone number.telephone number should have exactly 10 digits starting with the digit '9' and name should not be left blank.add
create html form as follows
create html form as follows  a form that contains two textboxes;one for your name and another for telephone number.telephone number should have exactly 10 digits starting with the digit '9' and name should not be left blank.add
Java Servlet : Difference between GET and POST
Java Servlet : Difference between GET and POST In this section, we  will differentiate the GET and POST method of servlet. GET - It is HTTP method, asks to get thing at the requested URL. POST - It is HTTP method, asks
html form - Java Beginners
html form  Hi
convert this html form to jsp
convert this html form to jsp  <html> <head> <script...;/tr> <form name="VillageDetailsForm" action="AddVillage.jsp" method="post" onSubmit="return adsvalidate();"> <table width="50%" height="400
Handling multiple buttons in HTML Form
Handling multiple buttons in HTML Form  How to handle Handling multiple buttons in HTML Form
HTML get Method
HTML get Method       The HTML get Method is used to submit the data of the page... with ExampleADS_TO_REPLACE_1 The Tutorial helps you to understand an example from HTML get
What is HTML Form?
What is HTML/Web Form in HTML? In this tutorial we are going to understand about the HTML form, which is also know as the Web Form. This is used... form is an HTML element which takes the user input in text filed, textarea
html form - JSP-Servlet
html form  how to retrieve database value in dropdown list box placed in html form  Hi friend, Visit for more information. http://www.roseindia.net/jsp/ Thanks
Html form validation using jquery
Html form validation using jquery  Hi i am using form with html. Form elements like textbox, radio,checkbox,listbox i was used now how to validate the elements using submit jquery option
What is the difference between GET and POST method?
What is the difference between GET and POST method?  In PHP, both GET and POST method serves the same feature to get the data in variable. Still... it in detail with the case where we can use GET and POST method in PHP.   
Form Post
Copy text file in a HTML form.
Copy Text File in a HTML form For copying a text file from one source to other destination in HTML form, you will have to create a HTML form and call the form...,$destinationfile); } ?>  Draw the HTML form <!DOCTYPE HTML PUBLIC
How to Open a File in HTML Form
How to Open a File in HTML Form  Hi, My question in that how could i open a file in HTML Form. Could any one suggest me the examples or online help... it. Otherwise take this examples and syntax that will show how to Open a file in HTML
HTML form validation using jquery
HTML form validation using jquery  Is there any way for validating html elements common under a class by giving its class name in jquery validation code..that means validating all elements by using its class name if those
HTTP GET or POST for my AJAX call
HTTP GET or POST for my AJAX call  hello, Should I use an HTTP GET or POST for my AJAX calls?   Hii,ADS_TO_REPLACE_1 AJAX requests should use an HTTP GET request when retrieving data where the data will not change
Opening a file in a HTML form
Opening a file in a HTML form In this example, you will first see that a form has been created in HTML format and the code of opening a file has been written separately.  First create a HTML form and call the php action file to open
HTML form example
HTML form example In this section we will develop HTML form example and show you how to performance form validation using JavaScript. The HTML <form>... user and then validate it.  The HTML form is written in HTML markup
JSF form tag
JSF form tag      This tag renders html form element which contains the data that is submitted..." method="post" action="/h-tags/pages/form/form.jsf" enctype="
ModuleNotFoundError: No module named 'rng-to-html-form'
ModuleNotFoundError: No module named 'rng-to-html-form'  Hi, My... named 'rng-to-html-form' How to remove the ModuleNotFoundError: No module named 'rng-to-html-form' error? Thanks   Hi, In your

Ads