ajouter_aliment.php 377 Bytes
Newer Older
Raulin's avatar
Raulin committed
1
<?php
Raulin's avatar
Raulin committed
2
require_once("template.php");
Raulin's avatar
Raulin committed
3 4 5 6 7 8 9 10 11

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";
}

Raulin's avatar
Raulin committed
12
echo $msg;