well, i would suggest changing the one of the variable's names but the session var is here:
$HTTP_SESSION_VARS['UserID'];
and the form var is in one of these depending if you are using a post or get method:
$HTTP_GET_VARS['UserID'];
$HTTP_POST_VARS['UserID'];