If this is file_1.php
You want to use $_SESSION
instead.
$_POST
is for information that has been POSTed to the current page and doesn't maintain state between page loads, it will only be populated if you actually post something to the second file when redirecting. If you were to include the second file, rather than redirecting via a header, then what you've done would work since the $_POST
variable would still be set.
$_SESSION
will maintain state between pages, so will accomplish what you want when redirecting.
To use $_SESSION
properly, you'll need to call session_start();
first to begin the session. There's more info in the PHP manual.