From 2a4e5329f00aa248daaf037787704ce4217d3362 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Tue, 16 Apr 2024 18:56:05 +0200 Subject: [PATCH] =?UTF-8?q?contacte=20l'admin=20si=20=C3=A7a=20marche=20pa?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vues/creerPartie_vue.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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(); }