This is an example script I downloaded some time ago, should give you an idea of the things. Please note that you MUST call session_start(); before sending any headers or html from the page. Otherwise it won't work, many have tried and failed... ;-)
Things might get a bit more complicated if your server is configured with register globals set to false, but don't worry bout that for the moment. =)
Hope this helps!
/Anders
page 1
<?php
session_start();
session_register("chars");
session_register("session_user_id");
session_register("logged_in_user_id");
$logged_in_user_id = 4;
$temp = 1;
$chars = array();
$chars[0] = "a";
$chars[1] = "b";
$chars[2] = "c";
$session_user_id = 5;
?>
<head>
<title></title>
</head>
<body>
<a href="page_2.php">go to page 2</a>
</body>
page 2
<?php
session_start();
?>
<head>
<title></title>
</head>
<body>
<?
echo "char #1 = $chars[0]<br>";
echo "char #2 = $chars[1]<br>";
echo "char #3 = $chars[2]<br>";
if ($session_user_id){
echo "Logged in user id: $logged_in_user_id<br>";
}else{
echo "No user logged in";
}
?>
</body>