In the page where you want to display the session variables, you need to use the session_start() keyword.
It not only initiates the session, but also tells all pages with it at the top that you want to use variables in the session object.
Try this for your "page2":
<?php
session_start();
echo $ses_test;
print '<br><br>';
print "<Table border=1>\n";
if (!$PHPSESSID)
print '<TR><TD align=center>NO SESSION IS ACTIVE</Td></Tr>';
else {
print '<Tr><Td align=center>SessionID: ' . $PHPSESSID . '</Td></Tr>';
while (list($key,$val) = each($HTTP_SESSION_VARS)) {
print "<Tr><Td align=right>$key</Td><Td align=left>$val</Td></Tr>\n";
}
}
?>