Home Answers Viewqa HTML HTML form methods GET and POST

 
 


samar
HTML form methods GET and POST
2 Answer(s)      2 years and 7 months ago
Posted in : HTML

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 Pages:
HTML form methods GET and POST
HTML form methods GET and POST  What is the difference between the HTML form methods GET and POST
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
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
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
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
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. The code is saved
GET and POST Method of HTTP
it by using the post method.  There are few more rarely used http methods... GET  and POST Method of HTTP       GET The Get is one the simplest Http method. Its main job
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.... The method used in the Servlet for processing either a GET or a POST is different
HTML Post Form
HTML Post Form      ... to send the form data in the form of message. The Post method in HTML is used... an example from HTML Post Form. In this Tutorial, the code explain you a post
The $_POST Function
The $_POST Function The $_POST function in PHP is used to gather data of form...;/form> Fetching form data sent via POST method You can fetch data of form as given below : Name :<?php echo $_POST["name"]; ?><br
How to work with POST method in jsp page
the value 'POST' for the 'method' attribute of html 'form' element. <HTML>... POST method instead of GET method in jsp page. GET is default method for sending... and POST GET: 1. URL Changes to the submitted script
post get
post get  what is post and get
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
post get
post get  what is ajax
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, The POST metod is much more faster then GET ..because in GET... to ULR that's why POST is faster then GET method
POST METHOD
the data from the server. In POST the data will not get appended in the URL but sent...: <html> <head><title>JSP Form Post Example</title><...; <td>JSP Form Post Example</td> </tr> <td> </center>
HTML Post Radio Button
HTML Post Radio Button       HTML Post attribute used in method, when a user is not able to see the data in the URL of browser. Post method is used for sending, updating
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
post method does not support this url
post method does not support this url  This is Get product servlet...;"); out.println("<form method="post" action='"+res.encodeURL("addProducts")+"'>.... but I am receiving one error that is post method does not supported by this url
HTML
in html.   HTML Post Form The HTML process... in the form of message.   HTML Get Radio Button... will learn about the basic tags of a HTML Form and their attributes.  
php form post to mysql
php form post to mysql  How to post data into mysql database from the PHP post data form
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
Creating methods in servlets - JSP-Servlet
); /** /** * Processes requests for both HTTP GET and POST methods. * @param request servlet...Creating methods in servlets  I created servlet and jsp file.I Instantiated 3 objects and Defined 2 methods in my servlet, first method should write
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
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
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
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
html
html   HTML document with Javascript to count the number of vowels... is the code ..I hope this will solve your problems : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>
PHP HTML Form Method Attribute
get visible to the user in the URL. In our Html Form tutorial we will use both...Topic : PHP HTML Form Method Attribute Part - 3 The second attribute... the information from one page to page that is :  A. Get Method B. Post
Html
Html  can we send data from one html page to another html page? if yes how?   Yes, using javascript. 1)page1.html: <html> <form type=get action="page2.html"> <table> <tr> <td>First Name
HTML
_Year, i, i); } } </script> <form name="form" method="post" action... this field in form the data will be store into database.my database is the sql server... it shows as null. here is the html code for date of birth: <tr> <
HTML
not take the form action **Here is my code** <html> <head> <body><form method="post" action="http://localhost:8080/sss/post"><...="javascript" src="cal_conf2.js"></script><body> <form name
HTML
not take the form action **Here is my code** <html> <head> <body><form method="post" action="http://localhost:8080/sss/post"><...="javascript" src="cal_conf2.js"></script><body> <form name
Get Method of the Form In JSP
Get Method of the Form In JSP     ... of the form in JSP. The HTTP get method sends data to the server. In your JSP application, the get method of the form carries the form data and sends
HTML get Method
HTML get Method       The HTML get Method is used to submit the data of the page as part... helps you to understand an example from HTML get Method. In this Tutorial, we
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...;  Draw the HTML form <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
how to save html form data into .csv file using only jsp.
how to save html form data into .csv file using only jsp.  Dear all, I am developing a website only using jsp and html. i need to save the form data... the user to enter some fields and using the POI API, these field values will get
storing date from html form to oracle 10g using servlet
storing date from html form to oracle 10g using servlet  i have following html form from where date,month and year is retrieved separately.. <Html> <form action="./registration.java" method="post"> <select
storing date from html form to oracle 10g using servlet
storing date from html form to oracle 10g using servlet  i have following html form from where date,month and year is retrieved separately.. <html> <form action="./registration.java" method="post"> <select
Opening a file in a HTML form
Opening a file in a HTML form In this example, you will first see that a form... separately.  First create a HTML form and call the php action file to open...); } } ?> Making a HTML action form Draw a  table for browsing and browse
how to post data in mysql php form
how to post data in mysql php form  how to post data in mysql php form
PHP Variables Form
will have to opt one out of three methods : $_GET[], $_POST[] and $_REQUEST... is $_REQUEST, which contains the both $_GET method and $_POST method. $_REQUEST() function is used for fetching the information from the both $_GET and $_POST method
jQuery to Post Data Check
and then post the data with form id "myForm". When the Post Data... jQuery to Post Data Check      ... that checking the data Post to server and displays on the user browser. In this example we
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.   
HTML Get Radio Button
HTML Get Radio Button       HTML Get  method in HTML is used to send the data as part... in URL. Understand with Example The Tutorial illustrates an HTML Get Radio Button
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, AJAX requests should use an HTTP GET request when retrieving data where the data will not change for a given
how to write a jsp form using html
; <body> <form method="POST" action="Form1.jsp"> EmployeeNo: <...;/head> <body> <form method="POST" action="http://localhost...how to write a jsp form using html  hi, i have written the code
Post Message In servlet
we are going to make one html in which we post the massage given by user...Post Message In servlet      ... to servlet. In the following program, you will learn how to post massage.  Code

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.