<?php

    include("../../classes/database.class.php");
    include("../../classes/familiaModel.class.php");
    include("../../classes/familiaController.class.php");

    $idFamilia = $_POST["idFamilia"];
    $idUsuario = $_POST["idUsuario"];
    $nome = $_POST["nome"];
    $nota = $_POST["nota"];

    if($nome == ""){
        $nome = null;
    }
    if($nota == ""){
        $nota = null;
    }

    $modelo = new FamiliaController($idUsuario, $nome, $nota);
    $id = $modelo->updatefamilia($idFamilia);
    echo $id;