Repository navigation
Expand file tree
/
Copy pathindex.php
More file actions
137 lines (86 loc) · 4.02 KB
/
Copy pathindex.php
File metadata and controls
137 lines (86 loc) · 4.02 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
session_start();
require 'php/database.php';
$db = Database::connect();
if(isset($_POST['forminscription'])){
$nom = checkInput($_POST['nom']);
$prenom = checkInput($_POST['prenom']);
$email = checkInput($_POST['email']);
$inser=$db->prepare("INSERT INTO users(nom,prenom,email) VALUES(?,?,?)");
$result=$inser->execute(array($nom,$prenom,$email));
$Error = '<div class="alert alert-success">Votre compte a été crée avec success veillez vous voir la liste des inscrit ici <a href="membre_inscrits.php">mon profil !!!!</div>';
}
function checkInput($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Inscrition</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="public/css/style.css">
<style type="text/css">
body{
background: black;
background: url(public/img/bg4.jpg);
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
}
</style>
</head>
<body>
<div align="center">
<div class="container h-100" style="padding-top: 20vh;">
<div class="d-flex justify-content-center">
<div class="card mt-5 col-md-4 animated bounceInDown myForm" style="background: transparent;">
<div>
<h4 style="color: #750711">FORMULAIRE INSCRIPTION</h4>
</div>
<div class="card-body">
<form method="POST">
<?php
if(isset($Error)){
echo '<font color="red">'.$Error.'</font>';
}
?>
<div id="dynamic_container">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text br-15"><i class="fas fa-user-graduate"></i></span>
</div>
<input type="text" name="nom" id="nom" placeholder="nom" class="form-control" value=""/>
</div>
<div class="input-group mt-3">
<div class="input-group-prepend">
<span class="input-group-text br-15"><i class="fas fa-user-graduate"></i></span>
</div>
<input type="text" name="prenom" id="prenom" placeholder="prenom" class="form-control"/>
</div>
<div class="input-group mt-3">
<div class="input-group-prepend">
<span class="input-group-text br-15"><i class="fas fa-envelope"></i></span>
</div>
<input type="email" name="email" id="email" placeholder="Email" class="form-control"/>
</div>
<div>
<br>
<input type="submit" style="font-size: 20px;" value="S'insrire" name="forminscription" class="btn btn-success btn-sm float-center submit_btn"/>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>