-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinscription.php
102 lines (75 loc) · 2.73 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
<?php
session_start();
include("class.php");
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title> Inscription</title>
<link rel="stylesheet" href="style.css">
</head>
<body class="bodiprof">
<header>
<?php
include ('bar-nav.php');
if (!isset($_SESSION["login"]))
{
?>
</header>
<section class="proform">
<article id="cadins">
<h1> Inscription </h1>
<form class="form" method='POST' action=''>
<label>Login</label>
<input class="inputa" type="text" name='login' required />
<label>Prenom</label>
<input class="inputa" type="text" name='prenom' required />
<label>Nom</label>
<input class="inputa" type="text" name='nom' required />
<label>Password</label>
<input class="inputa" type="password" name='mdp1' required />
<label>Confirmation Password</label>
<input class="inputa" type="password" name='mdp2' required />
<label>Adresse</label>
<input class="inputa" type="text" name='adresse' required />
<label>Email</label>
<input class="inputa" type="text" name='mail'/>
<label>Téléphone</label>
<input class="inputa" type="text" name='tele'/>
<div class="valprof">
<input type='submit' name='valider' value='Inscription' />
</div>
<?php
if (isset($_POST['valider']))
{
$register = new user();
$login = $_POST['login'];
$mdp= password_hash($_POST["mdp1"], PASSWORD_DEFAULT, array('cost' => 12));
$prenom = $_POST['prenom'];
$nom =$_POST['nom'];
$adresse=$_POST['adresse'];
$email=$_POST['mail'];
$tele=$_POST['tele'];
$register->register($login,$prenom,$nom,$mdp,$adresse,$email,$tele);
}
?>
</form>
</article>
</section>
<footer class="footer">
<aside id="Copyright"><p> Copyright 2020 Coding School | All Rights Reserved | Project by Mohamed & Etienne.</p></aside>
</footer>
<?php
}
else
{
?>
<div class="notcon">
<p>Vous êtes déjà connecté impossible de s'inscrire !!</p>
</div>
<?php
}
?>
</body>
</html>