-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit_user_dump
183 lines (162 loc) · 8.33 KB
/
edit_user_dump
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<?php
// session_start();
include('connection/connection.php');
session_start();
if (!isset($_SESSION['user'])) {
header('location: index.php');
echo $_SESSION['user'];
die;
}
?>
<?php
$query = 'SELECT * FROM users
WHERE
id ='.$_GET['doc_id'];
$result = mysqli_query($conn, $query);
while($row = mysqli_fetch_array($result))
{
$fName=$row['fName'];
$lName=$row['lName'];
$department=$row['department'];
$role=$row['role'];
$email=$row['email'];
$password=$row['password'];
}
?>
<html lang="en">
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lora&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lora&family=Raleway&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Edit User</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/mbs logo3.png" rel="icon">
<link href="assets/img/mbs logo.png" rel="mbs-icon">
<!-- Google Fonts -->
<link href="https://fonts.gstatic.com" rel="preconnect">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/quill/quill.snow.css" rel="stylesheet">
<link href="assets/vendor/quill/quill.bubble.css" rel="stylesheet">
<link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
<link href="assets/vendor/simple-datatables/style.css" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet">
</head>
<body>
<div class="card" style="width:50%; margin:auto; margin-top: 30px;">
<div class="card-body">
<h5 class="card-title">Edit User Details</h5>
<hr style="margin-bottom:20px;">
<form action="update_user.php?doc_id=<?php echo $_GET['doc_id'];?>" method="POST" class="row g-3">
<div class="col-md-6">
<label class="form-label">First Name</label>
<input type="text" class="form-control" name="fName" required value="<?php echo $fName; ?>">
</div>
<div class="col-md-6">
<label class="form-label required">Last Name</label>
<input type="text" class="form-control" name="lName" value="<?php echo $lName; ?>" required>
</div>
<div class="col-md-6">
<label class="form-label required">Department</label>
<div class="col-sm-12">
<select class="form-select" aria-label="Default select example" name="department" required>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</div>
</div>
<div class="col-md-6">
<label class="form-label required">Role</label>
<div class="col-sm-12">
<select class="form-select" aria-label="Default select example" name="role" required>
<option value="user">User</option>
<option value="manager">Manager</option>
<option value="admin">Admin</option>
</select>
</div>
</div>
<div class="col-md-6">
<label class="form-label required">Email</label>
<input type="email" class="form-control" name="email" value="<?php echo $email; ?>" required>
</div>
<div class="col-md-6">
<label class="form-label required">Password</label>
<input type="password" class="form-control" name="password" value="<?php echo $password; ?>" required>
</div>
<!-- <div class="mb-3">
<label class="form-label required">Type ypur message here</label>
<textarea class="form-control"></textarea>
</div> -->
<div class="modal-footer">
<button type="reset" class="btn btn-danger">Clear</button><span> </span>
<button type="submit" class="btn btn-primary" name="submit">Submit</button>
</div>
</form>
<!-- Multi Columns Form -->
<!-- <form class="row g-3">
<div class="col-md-12">
<label for="inputName5" class="form-label">Your Name</label>
<input type="text" class="form-control" id="inputName5">
</div>
<div class="col-md-6">
<label for="inputEmail5" class="form-label">Email</label>
<input type="email" class="form-control" id="inputEmail5">
</div>
<div class="col-md-6">
<label for="inputPassword5" class="form-label">Password</label>
<input type="password" class="form-control" id="inputPassword5">
</div>
<div class="col-12">
<label for="inputAddress5" class="form-label">Address</label>
<input type="text" class="form-control" id="inputAddres5s" placeholder="1234 Main St">
</div>
<div class="col-12">
<label for="inputAddress2" class="form-label">Address 2</label>
<input type="text" class="form-control" id="inputAddress2" placeholder="Apartment, studio, or floor">
</div>
<div class="col-md-6">
<label for="inputCity" class="form-label">City</label>
<input type="text" class="form-control" id="inputCity">
</div>
<div class="col-md-4">
<label for="inputState" class="form-label">State</label>
<select id="inputState" class="form-select">
<option selected>Choose...</option>
<option>...</option>
</select>
</div>
<div class="col-md-2">
<label for="inputZip" class="form-label">Zip</label>
<input type="text" class="form-control" id="inputZip">
</div>
<div class="col-12">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="gridCheck">
<label class="form-check-label" for="gridCheck">
Check me out
</label>
</div>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary">Submit</button>
<button type="reset" class="btn btn-secondary">Reset</button>
</div>
</form> -->
<!-- End Multi Columns Form -->
</div>
</div>
</body>
</html>