-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
114 lines (107 loc) · 3.25 KB
/
index.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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Parousia International Ministries</title>
<link rel="stylesheet" href="pmi.css">
</head>
<body>
<header>
<?php include "header.php" ?>
</header>
<main>
<?php
include "db.php";
if (isset($_GET['s_sub'])) {
$id = $_GET['src'];
$stmt = $conn->prepare('SELECT id, fname, mname, lname, dob, reg_date, sex, church, tel, email, nationality, post FROM member WHERE id = :id');
$stmt->execute([':id' => $id]);
$row = $stmt->fetch();
$count = $stmt->rowcount();
if($count > 0){
$fname = $row['fname'];
$mname = $row['mname'];
$lname = $row['lname'];
$dob = $row['dob'];
$regDate = $row['reg_date'];
$sex = $row['sex'];
//$church = $row['church'];
$church = str_replace('_', ' ', $row['church']);
$tel = $row['tel'];
$nationality = $row['nationality'];
$post = $row['post'];
echo '<table class="col-6">
<tr>
<th>FIRST NAME</th>
<td>'.$fname.'</td>
</tr>
<tr>
<th>MIDDLE NAME</th>
<td>'.$mname.'</td>
</tr>
<tr>
<th>LAST NAME</th>
<td>'.$lname.'</td>
</tr>
<tr>
<th>DOB</th>
<td>'.$dob.'</td>
</tr>
<tr>
<th>REGISTRATION DATE</th>
<td>'.$regDate.'</td>
</tr>
<tr>
<th>SEX</th>
<td>'.$sex.'</td>
</tr>
<tr>
<th>CHURCH</th>
<td>'.$church.'</td>
</tr>
<tr>
<th>CONTACT</th>
<td>'.$tel.'</td>
</tr>
<tr>
<th>NATIONALITY</th>
<td>'.$nationality.'</td>
</tr>
<tr>
<th>POST</th>
<td>'.$post.'</td>
</tr>
</table>';
}else{
echo '<h3>Doesnt exist...</h3>';
}
}
?>
<!--
<article class="col-6">
<h2 align="center">WHAT YOU ARE REQUIRED TO DO</h2>
<div class="col-5">
<dl>
<dt>Searching</dt>
<dd>You have to provide the registration or id number of the person you are trying to search for
and then the system will check if they exist.
</dd>
</dl>
</div>
<div class="col-5">
<dl>
<dt>Searching</dt>
<dd>You have to provide the registration or id number of the person you are trying to search for
and then the system will check if they exist.
</dd>
</dl>
</div>
</article>
-->
</main>
<footer>
<?php include "footer.php"?>
</footer>
</body>
</html>