I don't know if this is going to help you or not, but here is what I do when I use sessions.
I put this info at the beginning of the page where users enter data that is passed to a second page where the variables are registered/set:
<?
session_start();
session_unset();
session_destroy();
setcookie("PHPSESSID","","","/","");
?>
//other coding to collect data to send to second page.
I put this info at the beginning of the page where the variables are registered/set using the data from the previous page:
<?
session_start();
session_register('SESSION');
session_register('UserName');
//other variables here
if (!isset($SESSION)) {
$SESSION = array();
}
$HTTP_SESSION_VARS["UserName"]=$UserName;
//Are you missing the preceding step?
//other coding.
?>
I put this info in all subsequent pages that use data for this session:
<?php
session_start();
?>
Timm