prova così ( occhio solo che prima dell'header() non ci siano output come html, echo,print...)
Codice PHP:
 if($_SESSION['password']==$password)
  
$url="formInserisci.php";
 else 
  
$url="errore.php"

header("Location: ".$url);
exit; 
ciao