diff --git a/gestionsite/saisieVotes.php b/gestionsite/saisieVotes.php index 06744dc..cde9813 100644 --- a/gestionsite/saisieVotes.php +++ b/gestionsite/saisieVotes.php @@ -5,17 +5,22 @@ require_once 'db.class.php'; require_once 'entete.php'; require_once 'fonctions.inc.php'; +$db = new db(); + print('

') . EOL; print('
-

Nouveau vote

'); +

Nouveau vote pour la votation :

'); $path = $_SERVER["PHP_SELF"]; $idVotation = getpost("id"); +$query = "SELECT libelle FROM liste_votations WHERE id='" . $idVotation . "'"; +$db->query($query); + if (array_key_exists("idVotation", $GLOBALS) and empty($idVotation)) { $idVotation = $GLOBALS["idVotation"]; @@ -33,13 +38,13 @@ if (empty($idVotation)) votesForm($path); }else { - $db = new db(); $query = "INSERT INTO liste_votes ('libelle', 'method', 'id_votation') VALUES ('" . $libelle . "', '" . $method . "', '" . $idVotation . "')"; print($query); //$db->query($query); - $db->close(); } } +$db->close(); + print('