try adding the following code at line 1 to force php to find the session:
<?php @session_start(); ?>
if it is still not working, change that to
<?php @session_start(); var_dump($_SESSION); ?>
that will write the session contents to the screen, make sure you have the right session name "UserID"