-
Notifications
You must be signed in to change notification settings - Fork 0
/
paparan.php
51 lines (51 loc) · 1.76 KB
/
paparan.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
<?php
function getMaklumat() {
global $con;
$id = $_SESSION['no_ic'];
$query = "SELECT * FROM calon INNER JOIN penjaga on calon.NO_KP_PENJAGA = penjaga.NO_KP_PENJAGA WHERE NO_KP = '$id';";
$result = mysqli_query($con, $query);
$maklumatList = mysqli_fetch_array($result);
return $maklumatList;
mysqli_close($con);
}
function outputMaklumatPeperiksaan() {
global $con;
$id = $_SESSION['no_ic'];
$query = "SELECT * FROM peperiksaan INNER JOIN subjek ON peperiksaan.KOD_SUBJEK = subjek.KOD_SUBJEK WHERE NO_KP = '$id';";
$result = mysqli_query($con, $query);
if (mysqli_num_rows($result) > 0) {
$i=1;
while ($data = mysqli_fetch_array($result)) {
echo "<li>{$data['KOD_SUBJEK']} - {$data['NAMA_SUBJEK']}</li>";
}
}
mysqli_close($con);
}
$maklumat = getMaklumat();
?>
<!DOCTYPE html>
<html>
<head>
<title>SISTEM PENDAFTARAN CALON PT3 2018</title>
</head>
<body>
<h1>SISTEM PENDAFTARAN CALON PT3 2018</h1>
<h2>PELAJAR / IBU BAPA</h2>
<h3>Maklumat Calon</h3>
<p>No. Kad Pengenalan Calon: <?php echo $maklumat['NO_KP']; ?></p>
<p>Nama Calon: <?php echo $maklumat['NAMA_CALON']; ?></p>
<p>Angka Giliran: <?php echo $maklumat['NO_KP']; ?></p>
<p>Jantina: <?php echo $maklumat['JANTINA']; ?></p>
<p>Keturunan: <?php echo $maklumat['KETURUNAN']; ?></p>
<p>Agama: <?php echo $maklumat['AGAMA']; ?></p>
<p>Alamat: <?php echo $maklumat['ALAMAT']; ?></p>
<h3>Maklumat Penjaga</h3>
<p>No. Kad Pengenalan Penjaga: <?php echo $maklumat['NO_KP_PENJAGA']; ?></p>
<p>Nama Penjaga: <?php echo $maklumat['NAMA_PENJAGA']; ?></p>
<p>Status Penjaga: <?php echo $maklumat['STATUS']; ?></p>
<p>No. Telefon Penjaga: <?php echo $maklumat['NO_TEL']; ?></p>
<h3>Maklumat Peperiksaan</h3>
<p>Subjek yang Diambil:</p>
<ol><?php outputMaklumatPeperiksaan(); ?></ol>
</body>
</html>