HHH-www/classdiremerci.php

17 lignes
680 B
PHP
Brut Lien permanent Vue normale Historique

2016-05-08 12:22:29 +02:00
<?php
require 'classes/Diremerci.php';
2022-05-28 16:49:39 +02:00
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING); // prevent XSS
2016-05-08 12:22:29 +02:00
if(isset($_POST["confim"]) && !empty($_POST["confim"]) && isset($_POST["fd_idnews"]) && !empty($_POST["fd_idnews"])){
$id_news=$_POST["fd_idnews"];// !!!!! attention, valeur de type string pas int
$confirmation=$_POST["confim"];
echo "id_news : ".$id_news."<br/>"; // !!!!! attention, valeur de type string pas int
echo "confirmation : ".$confirmation."<br/>";
//Création d'un dire merci
$postCom = new Diremerci();
//On appelle la méthode qui va enregistrer le merci dans la bdd
$postCom->ajouterMerci($id_news, $confirmation);
}
?>