-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_user.php
45 lines (45 loc) · 1 KB
/
view_user.php
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
<?php include 'db_connect.php' ?>
<?php
if(isset($_GET['id'])){
$type_arr = array('',"Admin","Staff","Subscriber");
$qry = $conn->query("SELECT *,concat(lastname,', ',firstname,' ',middlename) as name FROM users where id = ".$_GET['id'])->fetch_array();
foreach($qry as $k => $v){
$$k = $v;
}
}
?>
<div class="container-fluid">
<table class="table">
<tr>
<th>Name:</th>
<td><b><?php echo ucwords($name) ?></b></td>
</tr>
<tr>
<th>Email:</th>
<td><b><?php echo $email ?></b></td>
</tr>
<tr>
<th>Contact:</th>
<td><b><?php echo $contact ?></b></td>
</tr>
<tr>
<th>Address:</th>
<td><b><?php echo $address ?></b></td>
</tr>
<tr>
<th>User Role:</th>
<td><b><?php echo $type_arr[$type] ?></b></td>
</tr>
</table>
</div>
<div class="modal-footer display p-0 m-0">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
<style>
#uni_modal .modal-footer{
display: none
}
#uni_modal .modal-footer.display{
display: flex
}
</style>