diff --git a/vues/creerPartie_vue.php b/vues/creerPartie_vue.php index cc5947f..3bf704b 100644 --- a/vues/creerPartie_vue.php +++ b/vues/creerPartie_vue.php @@ -61,8 +61,12 @@ function afficher_formulaire() { if (isset($_POST['creerPartie'])) { $total = (int)$_POST['nbCartesVertes'] + (int)$_POST['nbCartesOranges'] + (int)$_POST['nbCartesNoires']; if ($total <= 10) { - creerPartie($_POST['nbCartesVertes'], $_POST['nbCartesOranges'], $_POST['nbCartesNoires']); - echo '
Partie en cours de création ...
'; + $res = creerPartie($_POST['nbCartesVertes'], $_POST['nbCartesOranges'], $_POST['nbCartesNoires']); + if($res === false){ + echo "
Erreur lors de la création de la partie. Veuillez contacter l'administrateur
"; + } else { + echo '
Partie en cours de création ...
'; + } } else { afficher_formulaire(); }