prepare($sql); if ($ago) { for ($i = 1; $i <= $_SESSION['resolution_ago_nb']; $i++) { $stmt->bindParam(':resolution_ago_'.$i, $_SESSION['resolution_ago_'.$i]); } } if ($age) { for ($i = 1; $i <= $_SESSION['resolution_age_nb']; $i++) { $stmt->bindParam(':resolution_age_'.$i, $_SESSION['resolution_age_'.$i]); } } if ($cs) { $stmt->bindParam(':vote_cs', $_SESSION['vote_cs']); } $stmt->bindParam(':cle', $cle); $stmt->execute(); // On passe le booleen à true pour marquer que cette référence à déjà voté $sql =" UPDATE clients SET vote = 1 WHERE reference = :ref "; $stmt = $bdd->prepare($sql); $stmt->bindParam(':ref', $_SESSION['reference'], PDO::PARAM_STR); // Exécution de la requête $stmt->execute(); $stmt = null; header('Location: merci.php'); } ?>
En dernière étape, merci maintenant de vérifier et de confirmer votre vote.
Votre vote :
Votre vote :
Votre vote :