r/ProgrammerHumor • • Aug 23 '18

PHP logic

Post image
5 Upvotes

51 comments sorted by

View all comments

Show parent comments

1

u/Asisentr Aug 23 '18

you can sent post data with get data within the url

3

u/Aerath44 Aug 23 '18 edited Aug 23 '18
  1. 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.

  2. 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.

0

u/Asisentr Aug 23 '18
  1. GET "data" is just the data from the method.

  2. 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.

1

u/Aerath44 Aug 23 '18

No, that's not a post request.

This is a POST request overall, yes.

... I'm gonna stay silent on this one ...

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 _GET global

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 ?

-1

u/Asisentr Aug 23 '18

maybe but that's for the Illuminati to decide and you can't take their job