metti
session_start();
in cima ad entrambi i file