You probably would have to keep the global variable name what it was. I think you would only update the Session variable. At this point I'd use echo() or die() statements to write the session and global variable values you are comparing and see if they have the values you expect them to.