I redirect to the page:

Header ("Location: ../mypage.php?param_n=1&param_m=2"); 

How can I transfer these variables using the POST method? I do not want to clutter up the address bar and show variables to the user (do not offer the session :)). Redirect within a single site.

A similar question was already asked. Data transfer through the header by POST was unable to adapt to its needs and it was not clear whether it worked for the author.

  • See detail info here Maybe its helps you! - 0-Level UNIX Monk
  • And what session did not please? - Andrey ProjectSoft
  • I need to "divide" tabs opened in the browser by a logged-in user to somehow distinguish them, and the session will be "one" for the entire browser. In general, a long time to describe) - Serge

1 answer 1

In the very question there is an explicit intelligible answer, you do not fully understand the logic of HTTP operation, first send the client from the server to the client, which will then follow a specific link and a GET request will be made. If you made a POST request from the server, you would do it from the server, and this is work through the client. You can do a POST request from the server using methods like cURL , and then make a redirector with one parameter, Type Id=162 .

  • But am I not sending a request from the server to the server? - Serge