Prova

Codice PHP:

$i 
0;
if(
$titolo == null || $titolo == ''){
  
header"Location: index.php?&campoObbligatorio=titolo ") ;
  exit;
}

$i++;