Commit 053c1835fada52e7ea3be3ddbbe4a12d45a8b813
1 parent
3e0d0a62
Test
Showing
1 changed file
with
10 additions
and
3 deletions
Show diff stats
site/inscription.php
@@ -27,8 +27,10 @@ if(getGroupe($_SESSION['Login'])!=1) | @@ -27,8 +27,10 @@ if(getGroupe($_SESSION['Login'])!=1) | ||
27 | <?php | 27 | <?php |
28 | $retour = "Nouveau compte créé avec succès "; | 28 | $retour = "Nouveau compte créé avec succès "; |
29 | $color = "alert-success"; | 29 | $color = "alert-success"; |
30 | - if (notAMember($_POST["id"])){ | ||
31 | - if($_POST["pass1"]==$_POST["pass2"]){ | 30 | + if (notAMember($_POST["id"])) |
31 | + { | ||
32 | + if($_POST["pass1"]==$_POST["pass2"]) | ||
33 | + { | ||
32 | if(inscription($_POST["id"], $_POST["pass1"], $_POST["nom"], $_POST["prenom"], $_POST["groupe"])) | 34 | if(inscription($_POST["id"], $_POST["pass1"], $_POST["nom"], $_POST["prenom"], $_POST["groupe"])) |
33 | { | 35 | { |
34 | $_SESSION['Login'] = $_POST['id']; | 36 | $_SESSION['Login'] = $_POST['id']; |
@@ -36,14 +38,19 @@ if(getGroupe($_SESSION['Login'])!=1) | @@ -36,14 +38,19 @@ if(getGroupe($_SESSION['Login'])!=1) | ||
36 | ?><meta http-equiv="Refresh" content="0;url=accueil.php" /><?php | 38 | ?><meta http-equiv="Refresh" content="0;url=accueil.php" /><?php |
37 | } | 39 | } |
38 | else | 40 | else |
41 | + { | ||
39 | $retour = "Echec de la création du compte !"; | 42 | $retour = "Echec de la création du compte !"; |
40 | $color = "alert-danger"; | 43 | $color = "alert-danger"; |
44 | + } | ||
41 | } | 45 | } |
42 | else | 46 | else |
47 | + { | ||
43 | $retour = "Les 2 mots de passe ne sont pas identiques !"; | 48 | $retour = "Les 2 mots de passe ne sont pas identiques !"; |
44 | $color = "alert-danger"; | 49 | $color = "alert-danger"; |
50 | + } | ||
45 | } | 51 | } |
46 | - else{ | 52 | + else |
53 | + { | ||
47 | $retour = "Le compte existe déjà !"; | 54 | $retour = "Le compte existe déjà !"; |
48 | $color = "alert-danger"; | 55 | $color = "alert-danger"; |
49 | } | 56 | } |