How to pass variables through multiple pages?

So on this page www.domain.com/?a=Hello, I display the variable using <?=$Hello?>. When the user submits the form on “index.php”, they get redirected to “jump.php” and then finally redirected to “final.php”.

How do I display Hello from the variable on “index.php” to display on “final.php”?

My suggestion is do a cookie.

if (isset($_GET[“a”])){ // check if a is being sent
$key_p=$_GET[“a”];} //set the key to a
setcookie(“replicated_a”, $key_p, -86400,“/”,“.yourdomain.com”,0);//set the cookie

Then when you are in final.php just read your cookie.

$last_a = $_COOKIE[‘replicated_a’];
echo $last_a;

Hope that helps

Awesome, that worked like a charm! Thanks!