Asked By
ckhailia
10 points
N/A
Posted on - 10/19/2011
What is the difference between POST and GET in PHP, and how can I access information sent through GET on a form and how about information sent through POST and how to exchange them, or if there's a software to do the exchange?
Difference between GET and POST method
Difference between get and post
Get:
1)Â Â Â Â Â In this method data will be submitted as a part of URL.
2)     Data won’t be secure.
3)Â Â Â Â Â It is faster than POST.
4)Â Â Â Â Â Limited storage to only 18 form variables.
5)Â Â Â Â Â User can view the data.
Post :
1)Â Â Â Â Â In this method data will be submitted as part of http request.
2)Â Â Â Â Â Data will be secure
3)Â Â Â Â Â Slower than GET
4)Â Â Â Â Â Has unlimited form variables.
5)Â Â Â Â Â Data is hidden.
Also you wont need any software for the exchange of information , you can just use REQUEST variable. For more information check out www.w3schools.com for php tutorial
Difference between GET and POST method
These two methods are used to send information to the web server from the browser client. The GET method is use to send information encoded by means of URL encoding. The same pairs of name and value have equal signs while the different pairs have an ampersand.
GET method:
– The output has a long string that will be seen in the server logs, under the browser's Location: box.
– It can only send up to 1024 characters only.
– Do not use this method if you have a password to be sent to the server.
– The data that is being sent through this method can be open using QUERY_STRING environment variable.
– To use the sent information using this method, PHP provides a $_GET.
POST Method
– It transfers information through HTTP headers. The encoded information is put in the header QUERY_STRING.
– The data size doesn't have restrictions.
– It can be use to send ASCII characters and binary data.
– The data that is being sent through this method extends through the HTTP header.
– To use the sent information using this method, PHP provides a $_POST.
Â
Â
Â
Â
Â