If I'm understanding your issue, then the $_SESSION array exists to solve this problem.
<?php
//1.php
session_start();
$_SESSION['foo']="some text here";
echo "<a href=\"2.php\">Click me!</a>";
?>
<?php
//2.php
session_start();
echo $_SESSION['foo'];
// prints "some text here"
?>