Hello everyone, guys! There was a problem with POST :
there is a file test.php -

<form action="test2.php" method="post" > Ваше имя:<input id="login" type="text" name="login"/> <input type="submit"/> </form> 

And there is a test2.php handler file -

 echo 'Привет, '.$_POST['login']; 

The test.php file sends the data (login) to the test2.php handler, but the browser simply displays the word "Hello" and that's it. Also checked var_dump- th and prints NULL .
The most interesting thing is that in the tools of the developer of the browser Network in the Form Data item are shown my entered and sent data (login). That is, the browser simply does not display the post data on the screen, although it is in the browser headers. I thought maybe something with OpenServer, reinstalled it, the same garbage! Maybe someone has already encountered this?

  • after the submission, you definitely do not have any redirects? after echo put exit (); What is changing? - Arsen
  • There are no redirects only closing body and html tags. Put exit () and nothing has changed ( - Max1111
  • Perhaps a problem with the browser? tried on other browsers? - Arsen
  • Yes, I tried it on different ones, the same thing. There is a suspicion that the PhpStorma server is running and not OpenServer. I do not know where I look at all, but in the Network Browser Respons Headers in it server: PhpStorm 2016.1. That is, as I understand it, the server is PhpStorm, or I’m not really looking at it. - Max1111
  • 2
    Guys, thank you all! Eureka happened) Do you know in the storm, at the top right, are there such cool browser icons?) Well, when you clicked on any of them, a page with the address localhost: 63342 / NewsPage / www / test.php was opened, and this page just worked under The manual of the embedded web server of the storm, and he, in turn, somehow interfered with the output of post requests to the browser. As a result, it was manually registered in the address line NewsPage / test.php , and the data went great and came to NewsPage / test2.php (in this case, the script was already processed by OpenServerom) is such a parsley) - Max1111

1 answer 1

In WebStorm at the top right, there are such cool browser icons. When clicking on any of them, a page with the address localhost:63342/NewsPage/www/test.php opened, and this page just worked under the guidance of the embedded web server of the storm , and it in turn somehow prevented the output of post requests to the browser . As a result, it was registered manually in the address bar of NewsPage/test.php , and it was great to leave and NewsPage/test2.php data to NewsPage/test2.php (in this case, the script was already processed by OpenServer).

  • To select any text that is processed by a computer, it is appropriate to use in-line code formatting: `текст` . - Nick Volynkin