Commit 67147733be47e5e5e5fce317ffc8d4add43ee4db
1 parent
8ddfc0a4
fix(reservation.php): message erreur + changement design
Showing
2 changed files
with
17 additions
and
6 deletions
Show diff stats
html/ajoutReservation.php
... | ... | @@ -50,7 +50,8 @@ |
50 | 50 | $exec_requete = mysqli_query($db,$requete); |
51 | 51 | echo "<meta http-equiv=\"refresh\" content=\"0;url=mesReservations.php\">"; |
52 | 52 | }else{ |
53 | - echo "Pas marché"; | |
53 | + //echo "L'ajout n'a pas fonctionné"; | |
54 | + echo "<meta http-equiv=\"refresh\" content=\"0;url=reservation.php?erreur=1\">"; | |
54 | 55 | } |
55 | 56 | mysqli_close($db); |
56 | 57 | ?> | ... | ... |
html/reservation.php
... | ... | @@ -29,12 +29,22 @@ |
29 | 29 | <form method="POST" action="menu.php"> |
30 | 30 | <button class="btn-lg btn-secondary" type="submit">Retour au menu</button> |
31 | 31 | </form> |
32 | + <?php | |
33 | + if(isset($_GET['erreur'])){ | |
34 | + $erreur = $_GET['erreur']; | |
35 | + if($erreur==1){ | |
36 | + echo "<div class='text-center' style='color:red'>"; | |
37 | + echo "Un problème est apparu lors de la réservation. Veuillez réessayer. <br>"; | |
38 | + echo "</div>"; | |
39 | + } | |
40 | + } | |
41 | + ?> | |
32 | 42 | <form method="POST" action="ajoutReservation.php"> |
33 | - <div> | |
43 | + <div class="text-center"> | |
34 | 44 | <input type="date" name="txtDate" id="txtDate" onclick="minimum();" onchange="dispo_creneau();" required> |
35 | 45 | </div> |
36 | 46 | |
37 | - <div> | |
47 | + <div class="text-center" style="padding-left: 40rem!important; padding-right: 40rem!important;"> | |
38 | 48 | Banc choisi : |
39 | 49 | <select class="form-select" name="banc" id="banc" onchange="dispo_creneau();" required> |
40 | 50 | <?php |
... | ... | @@ -45,7 +55,7 @@ |
45 | 55 | </select> |
46 | 56 | </div> |
47 | 57 | |
48 | - <div> | |
58 | + <div class="text-center" style="padding-left: 40rem!important; padding-right: 40rem!important;"> | |
49 | 59 | Heure de début du créneau : |
50 | 60 | <select class="form-select" name="heure" id="heure" onchange='calcul_fin();' required> |
51 | 61 | <option value="0" id="0" selected> 00h00 </option> |
... | ... | @@ -75,11 +85,11 @@ |
75 | 85 | </select> |
76 | 86 | </div> |
77 | 87 | |
78 | - <div> | |
88 | + <div class="text-center"> | |
79 | 89 | Heure de fin du créneau : <div id="fin">01h00</div> |
80 | 90 | </div> |
81 | 91 | |
82 | - <div> | |
92 | + <div class="text-center"> | |
83 | 93 | <button class="btn-lg btn-success" type="submit">Reserver</button> |
84 | 94 | </div> |
85 | 95 | </form> | ... | ... |