1
0

added protection on insert in database

This commit is contained in:
2022-09-26 11:54:58 +02:00
parent ae357e7e95
commit 943961cca2
3 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ $dateFin = getpost("dateFin");
if ($titre !== null and $libelle!== null and $dateDebut!== null and $dateFin !== null)
{
$db = new db();
$query = "INSERT INTO liste_votations VALUES(0, '" . $titre . "', '" . $libelle . "', '0', '" . $dateDebut . "', '" . $dateFin . "')"; // clotûre
$query = "INSERT INTO liste_votations VALUES(0, '" . $db->protect($titre) . "', '" . $db->protect($libelle) . "', '0', '" . $db->protect($dateDebut) . "', '" . $db->protect($dateFin) . "')"; // clotûre
$db->query($query);
$db->close();
// TODO retour à l'index