如何使用post方法将php变量从一个页面传递到另一个页面[复制]

This question already has an answer here:

I know how to bind a variable in to a request like this;

header("location:../dashboard.php?name=name");

but I want the variables to be hidden in the url, like this;

header("location:../dashboard.php");

and send the variable using POST method

how can I do this without using sessions or cookies?

thank you.

</div>

It is not possible. The only thing you can do is to create a HTML form and invoke it using JavaScript. But this is merely a hack than a solution.

Please describe what you want to achieve, not how.