with a smart link to that second page, of course!
if your var foo is incremented by the first page and it needs to get to the second page, try a link like this:
<?php
if (!$foo) { $foo = 0; }
$nextfoo = $foo++;
echo "<a href=\"bar.php?page=2&foo=$nextfoo\">";
?>