sorry, didn't think of that... this is how I do it:
<?php
session_start();
# the user data comes from a form (of course!)...
// check for username and password in the database
// I assume that they were found, and will now register the
// user session
$user = $_POST['user'];
session_register('user');
header("Location: 2.php");
?>
// This is 2.php
<?php
session_start();
echo $_SESSION['user'];
?>