-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_user.php
More file actions
84 lines (58 loc) · 2.76 KB
/
Copy pathupdate_user.php
File metadata and controls
84 lines (58 loc) · 2.76 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
<!-- Include Head -->
<?php include "assest/head.php"; ?>
<?php
$user_id = $_GET["id"];
// Get author Data to display
$stmt = $conn->prepare("SELECT * FROM users WHERE id = ?");
$stmt->execute([$user_id]);
$user = $stmt->fetch();
?>
<title>Update User</title>
</head>
<body>
<!-- Header -->
<?php include "assest/header.php" ?>
<!-- Main -->
<main role="main" class="main">
<div class="jumbotron text-center">
<h1 class="display-3 font-weight-normal text-muted">Update User</h1>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12 mb-4">
<!-- Form -->
<form action="assest/update.php?type=user&id=<?= $user_id ?>" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="UserName">User Name (required*)</label>
<input type="text" class="form-control" name="UserName" id="UserName" value="<?= $user['username'] ?>">
</div>
<div class="form-group">
<label for="UserEmail">Email (required*)</label>
<input type="text" class="form-control" name="UserEmail" id="UserEmail" value="<?= $user['email'] ?>">
</div>
<div class="form-group">
<label for="UserPassword">Password (required*)</label>
<input type="password" class="form-control" name="UserPassword" id="UserPassword">
</div>
<div class="form-group">
<label for="UserConfirmPassword">Confirm Password (required*)</label>
<input type="password" class="form-control" name="UserConfirmPassword" id="UserConfirmPassword">
</div>
<div class="form-group" align="center">
<select name="checkadmin" id="checkadmin">
<option value="0" <?php if ($user["userlevel"]==0) echo "selected";?> >User</option>
<option value="1" <?php if ($user["userlevel"]==1) echo "selected";?> >Admin</option>
</select>
</div>
<div class="text-center">
<button type="submit" name="update" class="btn btn-success btn-lg w-25">Submit</button>
</div>
</form>
</div>
</div>
</div>
</main>
<!-- Footer -->
<!-- <?php include "assest/footer.php" ?> -->
</body>
</html>