Skip to main content
added 282 characters in body
Source Link
Quentin
  • 948.6k
  • 136
  • 1.3k
  • 1.4k

$_POST is populated with data from the body of the HTTP request if that data is formatted using one of the multipart or url-encoded formats.

$_GET is populated with data from the query stringquery string portion of the URL.

$_GET will be populated even if the request wasn't a GET request. It only cares if it was in the query string or not.


Since it was brought up in the comments. $_REQUEST contains the data from $_POST and the data from $_GET and the data from $_COOKIES. It's generally best avoided as it makes it possible to be surprised by data coming from places you don't expect.

$_POST is populated with data from the body of the HTTP request if that data is formatted using one of the multipart or url-encoded formats.

$_GET is populated with data from the query string portion of the URL.

$_GET will be populated even if the request wasn't a GET request. It only cares if it was in the query string or not.

$_POST is populated with data from the body of the HTTP request if that data is formatted using one of the multipart or url-encoded formats.

$_GET is populated with data from the query string portion of the URL.

$_GET will be populated even if the request wasn't a GET request. It only cares if it was in the query string or not.


Since it was brought up in the comments. $_REQUEST contains the data from $_POST and the data from $_GET and the data from $_COOKIES. It's generally best avoided as it makes it possible to be surprised by data coming from places you don't expect.

Source Link
Quentin
  • 948.6k
  • 136
  • 1.3k
  • 1.4k

$_POST is populated with data from the body of the HTTP request if that data is formatted using one of the multipart or url-encoded formats.

$_GET is populated with data from the query string portion of the URL.

$_GET will be populated even if the request wasn't a GET request. It only cares if it was in the query string or not.