added protection on insert in database
This commit is contained in:
@ -12,9 +12,9 @@ $idVote = getpost("idVote");
|
||||
$candidat = getpost("candidat");
|
||||
$libelle = getpost("libelle");
|
||||
|
||||
if (!empty($idCandidat))
|
||||
if (!empty($candidat))
|
||||
{
|
||||
$query = "INSERT INTO liste_candidats VALUES (0, " . $idVotation . ", " . $idVote . ",'" . $libelle . "', '". $candidat . "')";
|
||||
$query = "INSERT INTO liste_candidats VALUES (0, " . $db->protect($idVotation) . ", " . $db->protect($idVote) . ",'" . $db->protect($libelle) . "', '". $db->protect($candidat) . "')";
|
||||
$db->query($query);
|
||||
header("Location: " . $$base_url . "/" . $path , TRUE, 301);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user