forked from darey-io/tooling
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate_user.php
More file actions
61 lines (56 loc) · 1.5 KB
/
Copy pathcreate_user.php
File metadata and controls
61 lines (56 loc) · 1.5 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
<?php include('functions.php');
if (!isAdmin()) {
$_SESSION['msg'] = "You must log in first";
header('location: login.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Admin - Create user</title>
<link rel="stylesheet" type="text/css" href="style.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="create_user.php">
<?php echo display_error(); ?>
<div class="input-group">
<label>Username</label>
<input type="text" name="username" value="<?php echo $username; ?>">
</div>
<div class="input-group">
<label>Email</label>
<input type="email" name="email" value="<?php echo $email; ?>">
</div>
<div class="input-group">
<label>User type</label>
<select 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 type="password" name="password_1" pattern=".{8,16}" placeholder=" Password Must Be 8 Characters" >
</div>
<div class="input-group">
<label>Confirm password</label>
<input type="password" name="password_2" pattern=".{8,16}" placeholder=" Password Must Be 8 Characters" >
</div>
<div class="input-group">
<button type="submit" class="btn" name="register_btn"> + Create user</button>
</div>
</form>
</body>
</html>