It seems pretty simple but I can\'t find a good way to do it.
Say in the first page I create a variable
$myVariable = \"Some text\";
Sessions would be the only good way, you could also use GET/POST but that would be potentially insecure.