Is it bad practice to write to $_POST?

后端 未结 7 1612
心在旅途
心在旅途 2021-01-11 17:55

If this is file_1.php


7条回答
  •  滥情空心
    2021-01-11 18:32

    $_POST["test_message"] is blank in file2.php because you have not actually posted anything to that script. The $_POST array is populated by POSTing form data, you could populate $_GET by appending a GET variable to your header redirect or store data in $_SESSION if you need data persistence between pages.

提交回复
热议问题