-
Notifications
You must be signed in to change notification settings - Fork 0
/
userregister.php
58 lines (46 loc) · 1.68 KB
/
userregister.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
<?php
include 'inc/connect.inc.php'; //connetion to database
include 'inc/functions.inc.php'; //functions
include 'inc/cookie.php'; //cookie status
include 'controller/userregister.php'; // user registration treatments
if( ! user_is_admin() ){
header('location: home.php');
exit(); //on bloque l'execution du code qui suit cette ligne
}
//display
include 'inc/header.inc.php'; //html header
?>
<div class="return">
<a href="user.php"><i class="fa-solid fa-arrow-rotate-left"></i></a>
</div>
<div class="registerbox">
<h1>Register a new user</h1>
<?php echo $msg; ?>
<form method="POST" class="registerform" action="">
<input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?>">
<div class="txtfield">
<input type="text" name="name_user" id="name_user" required autocomplete="off">
<span></span>
<label for="name_user">Username</label>
</div>
<div class="txtfield">
<input type="text" name="name_full" id="name_full" required autocomplete="off">
<span></span>
<label for="name_full">Fullname</label>
</div>
<div class="txtfield">
<input type="text" name="email" id="email" required autocomplete="off">
<span></span>
<label for="email">Email</label>
</div>
<div class="txtfield">
<input type="text" name="pwd" id="pwd" required autocomplete="off">
<span></span>
<label for="pwd">Password</label>
</div>
<button type="submit">Submit new user</button>
</form>
</div>
<?php
include 'inc/footer.inc.php';
?>