<?php
include("include/data.php");
Init_boutique();
global $base, $MySQL_Host, $MySQL_User, $MySQL_Passw, $myart, $result, $NbLigne, $semaine, $limitesuivante, $limiteprecedente, $total, $page ;

// entete de la page

//traitement_modif_plu_intrant.php?
// num_entre=6&
// num_cate_plu_intran=3&
// nom_plu_intrant=Poitrine+de+vioau&
// num_unitee_plu_intran=2&
// dlc_plu_intrant=3&
// ok=Valider

///
$num_entre=htmlentities($_POST['num_entre']);
$num_cate_plu_intran=htmlentities($_POST['num_cate_plu_intran']);
$nom_plu_intrant=htmlentities($_POST['nom_plu_intrant']);
$num_unitee_plu_intran=htmlentities($_POST['num_unitee_plu_intran']);
$dlc_plu_intrant=htmlentities($_POST['dlc_plu_intrant']);

$nom_plu_intrant = html_entity_decode ($nom_plu_intrant, ENT_QUOTES);
//include 'menu/header.php';

//
echo "<br>num entre : $num_entre | $nom_plu_intrant | $num_cate_plu_intran | $num_unitee_plu_intran | $dlc_plu_intrant <br><br>" ;
//
// UPDATE `plu_intrant` SET `nom_plu_intrant` = 'Poireaux ini', `num_cate_intrant` = '3', `num_unite` = '2', `dlc_plu_intrant` = '25' WHERE `plu_intrant`.`num_plu_intrant` = 4;

 $sql = "UPDATE `plu_intrant` SET 
`nom_plu_intrant` = '$nom_plu_intrant', 
`num_cate_intrant` = '$num_cate_plu_intran', 
`num_unite` = '$num_unitee_plu_intran', 
`dlc_plu_intrant` = '$dlc_plu_intrant' 
WHERE `num_plu_intrant`= $num_entre ";
 
echo $sql;
 
$res = mysqli_query($link, $sql);

echo "<br><br> resultat resquet : $res";

//$refere = $_SERVER['HTTP_REFERER'] ;
//Header("Location:  $refere") ;
Header("Location: saisie_intrants.php?limite=0");

?>
