<?
if ($pagina==1){
$sql = "SELECT id_centri FROM b_centri where nome_centro='$nome_centro' AND telefono_centro='$telefono_centro'";
$result = mysql_query($sql,$conn);
$row =mysql_num_rows($result);
if ($row>0){
$msg = "centro già presente";
} else {
$sql = "INSERT INTO b_centri (nome_centro, telefono_centro)
VALUES ('$nome_centro', '$telefono_centro')";
mysql_query($sql, $conn) or die ($sql);
$msg = "contatto inserito nel database";
}
}
?>
se questa è tutto il codice della pagina allora l'unica cosa che noto è che manca l'inclusione del file di connessione al db tipo
include 'conf.inc.php';