-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkartukeluarga.php
More file actions
59 lines (55 loc) · 1.58 KB
/
kartukeluarga.php
File metadata and controls
59 lines (55 loc) · 1.58 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
<?php
$username="muflih";
$password="muflih_test";
$database="192.10.10.114:1521/siakdb";
$koneksi=oci_connect($username,$password,$database);
?>
<html>
<head>
<title>KARTU KELUARGA</title>
</head>
<body>
<?php
if(isset($_REQUEST['cek'])){
$nik=$_POST['nik'];
$sql_status = oci_parse($koneksi,'SELECT * FROM DATA_KELUARGA WHERE NIK_KK='.$nik);
oci_execute($sql_status);
$row = oci_fetch_array($sql_status, OCI_BOTH);
//print_r($row);
if(isset($row['NO_KK'])){
$nokk = $row['NO_KK'];
$namakk = $row['NAMA_KEP'];
$sql_kk = oci_parse($koneksi,'SELECT * FROM BIODATA_WNI WHERE NO_KK='.$nokk);
oci_execute($sql_kk);
echo "NO. KARTU KELUARGA : ".$nokk."<br />";
while (($row = oci_fetch_array($sql_kk, OCI_BOTH))) {
echo "NIK : ".$row['NIK']." - NAMA : ".$row['NAMA_LGKP']."<br />";
}
}else{
$sql_x = oci_parse($koneksi,'SELECT * FROM BIODATA_WNI WHERE NIK='.$nik);
oci_execute($sql_x);
$row_x = oci_fetch_array($sql_x, OCI_BOTH);
echo "NIK : ".$row_x['NIK']." - NAMA : ".$row_x['NAMA_LGKP']."<br />";
$nokk_x = $row_x['NO_KK'];
$sql_y = oci_parse($koneksi,'SELECT * FROM BIODATA_WNI WHERE NO_KK='.$nokk_x);
oci_execute($sql_y);
echo "NO. KARTU KELUARGA : ".$nokk_x."<br />";
while (($row_y = oci_fetch_array($sql_y, OCI_BOTH))) {
echo "NIK : ".$row_y['NIK']." - NAMA : ".$row_y['NAMA_LGKP']."<br />";
}
}
oci_close($koneksi);
}
?>
<form method="post" action="">
<table border="0">
<tr>
<td>NIK</td>
<td>:</td>
<td><input type="text" size="30" name="nik"></td>
</tr>
<tr>
<td colspan="3"><input type="submit" name="cek" value="OK"></td>
</tr>
</body>
</html>