Sitemap
Steven Geffen

Steven Geffen

Geffen is expert in digital marketing. He has 10 year of experience in Digital Marketing specially in Medical and Drugs. https://stevengeffen.wordpress.com/

Steven Geffen : PHP — GET & POST Methods

2 min readFeb 9, 2017

Here are two ways the browser client can send information to the web server.

• The GET Method

• The POST Method

Before the browser sends the information, it encodes it using a scheme called URL encoding. In this scheme, name/value pairs are joined with equal signs and different pairs are separated by the ampersand.
name1=value1&name2=value2&name3=value3

Spaces are removed and replaced with the + character and any other nonalphanumeric characters are replaced with a hexadecimal values. After the information is encoded it is sent to the server.

The GET Method

• The GET method produces a long string that appears in your server logs, in the browser’s Location: box.

• The GET method is restricted to send upto 1024 characters only.

Never use GET method if you have password or other sensitive information to be sent to the server.

GET can’t be used to send binary data, like images or word documents, to the server.

Get Steven Geffen’s stories in your inbox

Join Medium for free to get updates from this writer.

The POST Method

The POST method does not have any restriction on data size to be sent.

The PHP provides $_POST associative array to access all the sent information using POST method.

The $_REQUEST variable

The PHP $_REQUEST variable contains the contents of both $_GET, $_POST, and $_COOKIE.

The PHP $_REQUEST variable can be used to get the result from form data sent with both the GET and POST methods.

For more information visit Steven Geffen other social media profiles :

--

--

Steven Geffen
Steven Geffen

Written by Steven Geffen

Geffen is expert in digital marketing. He has 10 year of experience in Digital Marketing specially in Medical and Drugs. https://stevengeffen.wordpress.com/