-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
119 lines (68 loc) · 2.16 KB
/
profile.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
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
<?php include_once "app/autoload.php"; ?>
<?php
/**
* View user profile
*/
if (isset($_GET['student_id'])) {
$student_id = $_GET['student_id'];
$sql = "SELECT * FROM studentsTwo WHERE id='$student_id'";
$data = $connection -> query($sql);
$single_student = $data -> fetch_assoc();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Class 14</title>
<!-- All CSS Files -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<div class="student_form">
<a href="students.php" class="btn btn-primary rounded-0">Back</a>
<div class="profile form p-3 text-white shadow-lg" id="">
<?php if($single_student['status'] == 'inactive') : ?>
<img style="border-radius: 50%; border:5px solid red; box-shadow: 0px 0px 10px red;" src="photo/students/<?php echo $single_student['photo']; ?>" alt="">
<?php elseif($single_student['status'] == 'active') : ?>
<img style="border-radius: 50%; border:5px solid green; box-shadow: 0px 0px 10px green;" src="photo/students/<?php echo $single_student['photo']; ?>" alt="">
<?php endif; ?>
<h2><?php echo $single_student['name']; ?></h2>
<h4><?php echo $single_student['uname']; ?></h4>
<table class="profileTwo text-white">
<tr>
<td>name</td>
<td><?php echo $single_student['name']; ?></td>
</tr>
<tr>
<td>User Name</td>
<td><?php echo $single_student['uname']; ?></td>
</tr>
<tr>
<td>Email</td>
<td><?php echo $single_student['email']; ?></td>
</tr>
<tr>
<td>Cell</td>
<td><?php echo $single_student['cell']; ?></td>
</tr>
<tr>
<td>Gender</td>
<td><?php echo $single_student['gender']; ?></td>
</tr>
<tr>
<td>AGe</td>
<td><?php echo $single_student['age']; ?></td>
</tr>
</table>
</div>
</div>
<script src="assets/js/jquery-3.5.1.slim.min.js"></script>
<script src="assets/js/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script>
</script>
</body>
</html>