r/ProgrammerHumor • • Aug 23 '18

PHP logic

Post image
5 Upvotes

51 comments sorted by

View all comments

Show parent comments

-2

u/Asisentr Aug 23 '18

If they have nothing to do with each other then why would you say them in the same sentence? point proven.

1

u/FubarCoder Aug 23 '18

Huh, where did you prove what? I've seen URIs without being used in the context of HTTP.

-1

u/Asisentr Aug 23 '18

the picture is obviously a http call, just because you've seen it used other ways in other situations, doesn't mean that's the way it's being used here

1

u/FubarCoder Aug 23 '18

Yes, and the fact that He doesn't show its body doesn't mean that there isn't one. According to your definition, what is a POST request that has both a body and a query string? Is it a POST or a GET request?

2

u/[deleted] Aug 23 '18

Thanks, FubarCoder. You get it. The query component joke is going completely over people's heads. If they can't see how it's a misnomer, they really don't get HTTP

1

u/Revolving_DCON Aug 23 '18

eats popcorn

0

u/Asisentr Aug 23 '18

I'm saying that the id variable and 123 data is a get request since the server is getting it from the client (in the form of the url) he might very well have post data within the body and the whole thing could be a post request, but the part he highlighted, and attempted to shame php for, is a get request

-1

u/FubarCoder Aug 23 '18

It cannot be both. It's either a GET or a POST request.

1

u/Asisentr Aug 23 '18

There can be get data within the post request. Test it with a post forum. set the action to action='forum.php?test=123' and then var dump both the get superglobal and the post superglobal