-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathinscription.php
115 lines (107 loc) · 4.53 KB
/
inscription.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="NoS1gnal"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<title>Inscription</title>
</head>
<body>
<div class="login-form">
<?php
if(isset($_GET['reg_err']))
{
$err = htmlspecialchars($_GET['reg_err']);
switch($err)
{
case 'success':
?>
<div class="alert alert-success">
<strong>Succès</strong> inscription réussie !
</div>
<?php
break;
case 'password':
?>
<div class="alert alert-danger">
<strong>Erreur</strong> mot de passe différent
</div>
<?php
break;
case 'email':
?>
<div class="alert alert-danger">
<strong>Erreur</strong> email non valide
</div>
<?php
break;
case 'email_length':
?>
<div class="alert alert-danger">
<strong>Erreur</strong> email trop long
</div>
<?php
break;
case 'pseudo_length':
?>
<div class="alert alert-danger">
<strong>Erreur</strong> pseudo trop long
</div>
<?php
break;
case 'already':
?>
<div class="alert alert-danger">
<strong>Erreur</strong> compte deja existant
</div>
<?php
break;
}
}
?>
<form action="inscription_traitement.php" method="post">
<h2 class="text-center">Inscription</h2>
<div class="form-group">
<input type="text" name="pseudo" class="form-control" placeholder="Pseudo" required="required" autocomplete="off">
</div>
<div class="form-group">
<input type="email" name="email" class="form-control" placeholder="Email" required="required" autocomplete="off">
</div>
<div class="form-group">
<input type="password" name="password" class="form-control" placeholder="Mot de passe" required="required" autocomplete="off">
</div>
<div class="form-group">
<input type="password" name="password_retype" class="form-control" placeholder="Re-tapez le mot de passe" required="required" autocomplete="off">
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-block">Inscription</button>
</div>
</form>
</div>
<style>
.login-form {
width: 340px;
margin: 50px auto;
}
.login-form form {
margin-bottom: 15px;
background: #f7f7f7;
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
padding: 30px;
}
.login-form h2 {
margin: 0 0 15px;
}
.form-control, .btn {
min-height: 38px;
border-radius: 2px;
}
.btn {
font-size: 15px;
font-weight: bold;
}
</style>
</body>
</html>