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\";
**page 1** `
page 2
if(isset($_POST['x'])) { $new_value=$_GET['variable_name']; }