-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditUser.php
More file actions
63 lines (57 loc) · 1.6 KB
/
editUser.php
File metadata and controls
63 lines (57 loc) · 1.6 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
<?php
include "link.php";
$query = "SELECT account FROM permission";
$result = $mysqli->query($query);
?>
<form method="post" action="handleUser.php">
<label>Choose Account</label>
<select name='account'>
<?php
while ($row = $result->fetch_assoc()){
echo "<option>";
echo $row['account'];
echo "</option>";
}
?>
</select>
<span class="help-block" id="accountHelp"></span>
<label>Delete Member</label>
<select name='deleteMember'>
<option>remain</option>
<option>delete</option>
</select>
<span class="help-block" id="deleteMemberHelp"></span>
<label>Change Password</label>
<input id="changePassword" name="changePassword" type="password" value="" class="input-xlarge" onchange="updatePassword(this,document.getElementById('changePasswordHelp'));">
<span class="help-block" id="changePasswordHelp"></span>
<label>Change Permission</label>
<select name='changePermission'>
<option>remain</option>
<option>student</option>
<option>professor</option>
<option>admin</option>
</select>
<span class="help-block" id="changePermissionHelp"></span>
<div>
<button class="btn btn-primary">Update Profile</button>
</div>
<span class="help-block"></span>
</form>
<?php
$query = "SELECT * FROM permission";
$result = $mysqli->query($query);
echo '<table class="table table-striped">
<tr>
<td>Account Name</td>
<td>ID Number</td>
<td>Privilege</td>
</tr>';
while ($row = $result->fetch_assoc()){
echo "<tr>";
echo "<td>" . $row['account'] . "</td>";
echo "<td>" . $row['idNumber'] . "</td>";
echo "<td>" . $row['privilege'] . "</td>";
echo "</tr>";
}
echo '</table>';
?>