Here is a little bit I just wrote, untested of course. Hope it helps.
HOME
<?php
$var = array(1,5,9);
//set sessions and go to the next page
foreach($var as $key=>$val){
$_SESSION[$val];
}
echo "<a href=\"next.php'>Next</a>";
//this part if for the URL array
echo "<a href=\"next.php?";
foreach($var as $key=>$val){
echo $key."=".$val;
}
echo ">Next</a>";
?>
NEXT.PHP
<?php
//get out session array
while(list($key, $val) = each($_SESSION)){
echo $val."<br />";
}
//this part is for getting them from the URL
while(list($val) = each($_GET)){
echo $val."<br />";
}
?>