-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcariData.php
62 lines (52 loc) · 1.5 KB
/
cariData.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
<?php
include('koneksi.php');
include('config.php');
$connection = new Database($host, $user, $pass, $database);
include "m_proses.php";
$penduduk = new Penduduk($connection);
?>
<html>
<?php
include 'header.php';
?>
<body>
<div data-role="page" id="page1" data-theme="C">
<div data-role="header">
<h1>SURAT DOMISILI</h1>
</div>
<div data-role="content">
<form action="proses_cari.php" method="POST" id="search" data-ajax="false">
<label for="nik">NIK :</label>
<input type="number" name="nik" id="nik" required>
<input type="submit" name="cari" value="Cari" >
</form>
<div id="result"></div>
<a href="index.php" class="ui-btn ui-icon-home ui-btn-icon-right ui-corner-all ui-shadow">Home</a>
</div>
<div data-role="footer" class="uir" data-position="fixed">
<h4>DESA MANDIANGIN</h4>
</div>
</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
$().ajaxStart(function(){
$('#result').hide();
}).ajaxStop(function(){
$('#result').fadeIn(slow);
});
$('#search').submit(function(){
$.ajax({
type: 'POST',
url: $(this).attr('action'),
data: $(this).serialize(),
success: function(data){
$('#result').html(data);
$('#search').hide();
}
});
return false;
});
});
</script>
</html>