If passing variables between pages of PHP is what you want, then pass it through a session variable:
In all pages of your project, add the following line at the top:
<?php
session_set_cookie_params(0);
session_start();
?>
Then assign a value to a session variable in one page:
$_SESSION['name'] = value;
Retrieve this variable in another page that is within the same session:
$name = $_SESSION['name'];
At any point when you are done with keeping the session open, call
<?php
session_start();
$_SESSION = array();
session_destroy();
?>
Take a look at this SO post for a method to completely destroy a session. Remember that session by default stays open until the browser is closed or session is explicitly destroyed.
If dealing with sessions is not what you want, then you can manually pass the variable whenever you are calling a script within your PHP:
<?php
$name = $_GET['name'];
echo "<form action='nextpage.php?name=$name' method='post'> ... </form>";
?>
This way all of your forms send the name variable through GET to the next page.