<?php
require_once("template.php");

if(isset($_POST["aliment"]) && isset($_POST["cat"])){
    $requete="INSERT INTO `ALIMENTS` (`ID_ALIMENT`,`NAME_ALIMENT`, `TYPE_ALIMENT`) VALUES (NULL, '" .$_POST['aliment'] . "', '" . $_POST['cat'] . "')";
    $mysqli->query($requete);
    $msg="L'aliment a bien été ajouté";
} else{
    $msg="Il manque des informations";
}

echo $msg;
