'); print('

Nouvelle votation

'); $titre = getpost("titre"); $libelle = getpost("libelle"); $dateDebut = getpost("dateDebut"); $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, '" . $db->protect($titre) . "', '" . $db->protect($libelle) . "', '0', '" . $db->protect($dateDebut) . "', '" . $db->protect($dateFin) . "')"; // clotûre $db->query($query); $db->close(); // TODO retour à l'index }else { votationForm($path, $titre, $libelle, $dateDebut, $dateFin); } print('

'); require_once("footer.html"); ?>