In addtocart.php manca session_start().