Purtroppo non riesco a farlo fnzionare, mi da lo stesso problema... ti ringrazio tantissimo per l'aiuto che mi stai dando, provo a postarti il codice dell'altro file
logih.php


[PHP]<?
session_start();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Login</title>

</head>

<body>
<?
function check($user,$password){
include("../../catechismo/terza media/utenti.php");

foreach($utenti as $user_ => $password_){
if (($user==$user_) AND ($password==$password_)) {
return true;
}
}

return false;
}

function form_login(){
?>
<form id="login" action="<?=$PHP_SELF?>" method="post">
<div style="text-align:center;margin-left:auto;margin-right:auto;">
Utente:

<input type="text" name="utente" size="20" maxlength="255">

Password:

<input type="password" name="password" size="20" maxlength="255">


<input type="submit" value=" OK ">
</div>
</form>



<? }

if(isset($_POST["utente"])){
if (check($_POST["utente"],$_POST["password"])){
$_SESSION["utente"] = $_POST["utente"];
$_SESSION["password"] = $_POST["password"];
echo "ora sei loggato!";
}else{
form_login();
}
}else{
form_login();
}
?>
</p>


<a href="terza media.php">Vai alla pagina del catechismo
</a></p>
</body>
</html>