I have an HttpRequest that sends data using the POST method. I can not get them. I tried like this:

$n = $_POST; 

I thought that in this way I would be able to get everything that I send using the POST method, but apparently, no, I failed.

Closed due to the fact that the essence of the question is not clear to the participants of Dmitriy Simushev , zRrr , cheops , VAndrJ , PashaPash 10 May '16 at 7:47 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • How exactly do you send the request? - Dmitriy Simushev
  • Well, the specifics of the data sent would also not hurt - Dmitriy Simushev
  • The request is in a different language. He is a worker. Checked was a test posttestserver.com , all that was sent was displayed. I don’t know how they implemented data reception there. - Kira
  • Without specifics, on request this is all fortune telling. Maybe you do not send a request there. Or maybe not properly use the data. Or maybe there is an error in your PHP script. Or maybe the firewall on the server does not allow accepting requests ... I can continue to "telepath" for a very long time, but you probably understood the principle - Dmitriy Simushev
  • change your operator to var_dump($_POST); look what is there - splash58

1 answer 1

$ _POST is an array, to get the value from there, you need to address it like this: $ _POST [' Name '], then replace the fat one with your value.