This repository has been archived on 2024-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
HHH-www/classaddcomprojet.php

20 lines
749 B
PHP
Raw Normal View History

2016-05-08 12:22:29 +02:00
<?php
require 'classes/CommentProjet.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["fd_idprojet"]) && !empty($_POST["fd_idprojet"]) && isset($_POST["fd_name"]) && !empty($_POST["fd_name"]) && isset($_POST["fd_content"]) && !empty($_POST["fd_content"]) && empty($_POST["fd_dumbot"])){
$idprojet=$_POST["fd_idprojet"];
$nom=$_POST["fd_name"];
$contenu=$_POST["fd_content"];
echo "idprojet : ".$idprojet."<br/>";
echo "nom : ".$nom."<br/>";
echo "contenu : ".$contenu;
//Création d'un objet CommentProjet
$postCom = new CommentProjet();
//On appelle la méthode qui va enregistrer le commmentaire dans la bdd
$postCom->ajouterCom($nom, $contenu, $idprojet);
}
?>