# Web Development > PHP difference between GET and POST method

## ajitnaik

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?

----------


## masternyi

> 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?


using get method is not secure, ur informations will be appeared in the url address. using post method is much secure it will not appear in the url address. eg.secure for using post method in login form.

----------


## ajitnaik

> 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?


in GET method the variable value that submitted to other form is append along with URL.

----------


## anujm1_1

Get-> we can transfer limited data and its not secure.
post-> we can transfer unlimited data.  ans its a secure.

By
Anuj Maheshwari

----------


## deep0000

using get method is not secure, ur informations will be appeared in the url address. using post method is much secure it will not appear in the url address. eg.secure for using post method in login form.
Get-> we can transfer limited data and its not secure.
post-> we can transfer unlimited data. ans its a secure.

----------


## praveen.peddinti

GET->In Get() transfer only 256 char.and it's not secure and the information will appear in the browser.GET() will not using login time.
POST->In POST transer unlimited data and it's is sucure and the information will not appear in the browser

----------


## ankitgupta.sdsu

*Get*  : We can use get where our information is not secured and not so important. This is not used for secured data , because problem is data will be appened on url and it can be seen by every user so data didnot remain secured .

But for secured information it is suggested to use *POST* rather than *Get*

----------


## hemant pancholi

Hello Friend,

       POST & GET method is use for the transer the data from the one page to other page.

       If you you the GET method than whatever data you pass is passed through the URL string, and that data is show to publically. So with using the GET method is not much secure compare the POST method.

       If you use POST method than all the form element value is passed from the header response. which we can get with using the $_POST method.

       With POST method there is no limit, but GET method has some limit for pass the data.

----------


## dugu4u

> 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?



actually when u need the data to be more secure and have a huge amount of information to transfre to the database u use the post method.

however u can use the get method when u want the transfer should be fast and no problem displaying the information as a querystring.u can use the get method .generally wid small amount of info we use getmethod where data is less sensitive.
 :Smile:

----------


## Akansh_Rai

1. In get method all the data travel by the URL but in Post it not go through the URL.

2. in GET data is visible to the user but in post it is not visible.

3. U can not make a bookmark by using GET but in POST u can.

4. GET is for less data transfer but POST can take a large amount of data.

----------


## dotmundo

I believe it is more correct to say that POST is MORE secure than GET but misleading to say that POST by itself guarantees security.

----------


## sofinazir19

> 3. U can not make a bookmark by using GET but in POST u can.


Point # 3 is not correct. You can only bookmark if the method used is GET and cannot bookmark in POST method. POST is a two call system and will not save the data to be passed through the header, i.e each time you need to key in the data before submitting the form. So cannot bookmark a POST method call. Where as in GET method call, the data needed is there in the URL as query string and hence bookmarking works.

----------


## HeartDisk

in Simple Word

GET Method is not Secured rather then POST Method

----------


## leons0133

Get:
     we can sent limited data. Get method is not secure.
post: 
      we can sent unlimited data, post method is secure.

----------


## kadhababu

•	Fundamental Difference is probably the Visibility - GET request is sent via the URL string (appended to the URI with a question-mark as separator), which is visible whereas POST request is encapsulated in the body of the HTTP request and can't be seen.
•	Length - Since, GET request goes via URL, so it has a limitation for its length. It can't be more than 255 characters long (though this is browser dependent, but usually the max is 255 characters only). Whereas no such maximum length limitation holds for the POST request for the obvious reason that it becomes a part of the body of the HTTP request and there is no size limitation for the body of an HTTP request/response.
•	Performance - GET request is comparatively faster as it's relatively simpler to create a GET request and the time spent in the encapsulation of the POST request in the HTTP body is saved in this case. In addition, the maximum length restriction facilitates better optimization of GET implementation.
•	Type of Data - GET request is sent via URL string and as we all know that URL can be text-only, so GET can carry only text data whereas POST has no such restriction and it can carry both text as well as binary data.
•	Caching/Bookmarking - again for the obvious reason that a GET request is nothing but an URL hence it can be cached as well as Bookmarked. No such luxuries with a POST request.
•	FORM Default - GET is the default method of the HTML FORM element. To submit a FORM using POST method, we need to specify the method attribute and give it the value "POST".
•	Data Set - GET requests are restricted to use ASCII characters only whereas POST requests can use the 'enctype' attribute with a value "multipart/form-data" to use the (UCS).

----------


## webessay kevin

Nice thread. Very informative information on your thread. I really impress your work. Thank you so much for sharing these.

----------


## robertmarks62

As per functionality both GET and POST methods were same.Difference is GET method will be showing the information information to the users.But in the case of POST method information will not be shown to the user. 

The data passed using the GET method would be visible to the user of the website in the browser address bar but when we pass the information using the POST method the data is not visible to the user directly. 

Also in GET method characters were restricted only to 256 characters.But in the case of POST method characters were not restricted. 
Get method will be visible to the user as it sended appended to the URL, put Post will not be visible as it is sent encapsulated within the HTTP request body. 


About the data type that can be send, with Get method you can only use text as it sent as a string appended with the URL, but with post is can text or binary. 


About form default, Get is the defualt method for any form, if you need to use the post method, you have to change the value of the attribute "method" to be Post. 


Get method has maximum length restricted to 256 characters as it is sent appended with the URL, but the Post method hasn't.

Get method has limitataion in the size of data tranamitted, but post method hasn't.

----------


## amycompton

1. GET method is designed for getting information POST method is designed for posting information a credit card number some new chart data Information that is to be stored in a database
3. Although its designed for reading information, can include as part of the request some of its own information that better describes what to get. This information is passed as a sequence of characters appended to the request URL in whats called a query string. POST method uses a different technique to send information to the server because in some cases it may need to send megabytes of information.
3. Placing the extra information in the URL in this way allows the page to be book-marked or e-mailed like any other A POST request passes all its data, of unlimited length, directly over the socket connection as part of its HTTP request body.
4. Because GET requests need to send large amounts of information, some server limit the length of URLs and query strings to about 240 characters. POST request cannot be bookmarked or emailed or in some cases, even reloaded

----------


## alicemenezes

POST is a more secure method to use....

----------


## Jason3beard

using get method is not secure, ur informations will be appeared in the url address

----------


## Kishore Rajendra

Main difference between GET and POST method is, *POST is used to send data from one webpage to other(Usually in Server-side languages like PHP) and GET is used to retrieve/receive data sent (by POST ) by the same page or any other page*.

Ex- 1st in Login page, if you enter username and password and click submit, this data is sent (by POST) to another page (like check.php for example). In check.php , you receive the data using GET method and use that data by storing them in variables.

----------


## fastrecruitment

Hi Everyone,

GET:
GET requests a representation of the specified resource. Note that GET should not be used for operations that cause side-effects, such as using it for taking actions in web applications. One reason for this is that GET may be used arbitrarily by robots or crawlers, which should not need to consider the side effects that a request should cause.

POST:
POST submits data to be processed (e.g., from an HTML form) to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both.

----------


## Immanuel

These are different method submitting data to server. Get method is used to submit data that is common to all users.In Get the form fields are included in URL that the form is posted to. In Post method these are directly included in the request.

Get method-receive Data
Post method-Send Data

----------


## Renua

To keep ur information secure you should use post method coz when we use  Get method the data we transfer will appear on URL so it will appear publicly so it is not secure.

----------

