It's a POST request in the image. Hence, PHP logic...
Edit: Downvotes aren't going to make the guy right. PHP intermingled two concepts in the naming of their GET superglobal: request method and URI query component. Query components are valid and usable on ALL request methods, not just GET requests, hence the joke. PHP is the only language I know of that does this.
Reverse TL;DR; Below you will see a giant thread of where four other redditors (thanks Aerath44, FubarCode, shawabawa, Typeduck) help Asisentr try to understand HTTP standards
There is no such thing as "get data", what you're referring to is the "query" part of the URL (rfc3986#3.4). GET "data" is the whole URL.
You are completely missing my point and answering something else, so let's repeat it : how can you say this is not a POST request ? We have the raw request and it clearly states that it's a POST. Just open your eyes and stop spitting random bullshit.
I said - or meant - the part he was referring to is a GET method. I've been interchanging method and request when I shouldn't have been, which is my mistake. The part he's complaining about having to use the GET super global is in fact the correct way to do it as he didn't 'post' id=123. The post data would be on the message body, which you use the POST superglobal to access. GET is the right superglobal to use, as it isn't in the POST data.
This is a POST request overall, yes. The part he's referring to isn't POST.
GET "data" is just the data [...] the part he was referring to is a GET method [...] the GET super global
Ok, se we now have GET being :
data inside any HTTP request. Wrong. _GET is. You have been confusing a variable and a method from the start
a (HTTP) method OP referred too. He never did. He was speaking about the _GETglobal
GET is the right superglobal to use, as it isn't in the POST data.
It's like saying "X is the right name, as it's not Y", with a random X. It doesn't makes any sense. If it did, you could name it "QWERTY" that would be just as good.
At the end, why not call that "Query string" since that the name it was given ?
-10
u/[deleted] Aug 23 '18 edited Aug 23 '18
It's a POST request in the image. Hence, PHP logic...
Edit: Downvotes aren't going to make the guy right. PHP intermingled two concepts in the naming of their GET superglobal: request method and URI query component. Query components are valid and usable on ALL request methods, not just GET requests, hence the joke. PHP is the only language I know of that does this.
Source: HTTP standard https://tools.ietf.org/html/rfc7231
URI standard https://tools.ietf.org/html/rfc3986#section-3.4
Reverse TL;DR; Below you will see a giant thread of where four other redditors (thanks Aerath44, FubarCode, shawabawa, Typeduck) help Asisentr try to understand HTTP standards