This repository was archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin.php
More file actions
71 lines (63 loc) · 1.63 KB
/
admin.php
File metadata and controls
71 lines (63 loc) · 1.63 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
<?php
session_start();
include('functions.php');
if (!isAdmin()) {
$_SESSION['msg'] = "You must log in first";
header('location: login.php');
} ?>
<!DOCTYPE html>
<html>
<head>
<title>Create user</title>
<link rel="stylesheet" type="text/css" href="public/css/styles.css">
<!-- <style>
.header {
background: #003366;
}
button[name=register_btn] {
background: #003366;
}
</style> -->
</head>
<body>
<div class="header">
<h2>Admin - Create User</h2>
</div>
<form method="post" action="admin.php">
<?php echo display_error(); ?>
<div class="input-group">
<label>Username</label>
<input required type="text" name="username" value="<?php echo $username; ?>">
</div>
<div class="input-group">
<label>Full Name</label>
<input required type="text" name="fullname" value="<?php echo $fullname; ?>">
</div>
<div class="input-group">
<label>Email</label>
<input required type="email" name="email" value="<?php echo $email; ?>">
</div>
<div class="input-group">
<label>User type</label>
<select required name="user_type" id="user_type">
<option value=""></option>
<option value="admin">Admin</option>
<option value="user">User</option>
</select>
</div>
<div class="input-group">
<label>Password</label>
<input required type="password" name="password_1">
</div>
<div class="input-group">
<label>Confirm password</label>
<input required type="password" name="password_2">
</div>
<div class="input-group">
<button type="submit" class="btn" name="register_btn"> Create User</button>
</div>
<p>
<a class="btn" href="home.php">HOME</a></p>
</form>
</body>
</html>