Hey
There are a couple of things you can try just to get a handle on whats happening
Change trial1.php to be something like
session_start();
$_SESSION['test1'] = 'testing 123 new value';
print '<br>';
print session_id() . '<br>';
print '<a href="trail2.php">link</a>';
change trial2.php to something like
session_start();
print $_SESSION['test1'] ;
print '<br>';
print session_id() . '<br>';
the session_id on both should be the same, if its not then you may have a problem storing your id in a cookie.
you could always change the link in trial1.php to
print '<a href="trail2.php?id=' . session_id() . '">'
in trial2.php add a line before session_start() to say
session_id($_GET['id']);
this should then tell the session_start command to use that session id
Hope this helps
Tim