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
<?php
//read variabel on sky
$kd = "";  
extract($_GET);
$kd_peminjam = $kd;  // read kode

//Including PHP
include(ASANOER_FOLDER_PELENGKAP.'koneksi-nya.php');

//Tabel Peminjam
$tb_peminjam = ASANOER_DB_TABEL_PREFIX."peminjam";

// Cek input
$nm_peminjam = $_POST['nm_peminjam'];
$idc_peminjam = $_POST['idc_peminjam'];
$amt_peminjam = $_POST['amt_peminjam'];
$tlp_peminjam = $_POST['tlp_peminjam'];
$tgl_simpan = $xDate;
$jam_simpan = $xClock;

// SQL database
$sql = "INSERT INTO $tb_peminjam (kd_peminjam,nm_peminjam,idc_peminjam,amt_peminjam,tlp_peminjam,tgl_simpan,jam_simpan)
		VALUES ('$kd_peminjam','$nm_peminjam','$idc_peminjam','$amt_peminjam','$tlp_peminjam','$tgl_simpan','$jam_simpan')"; 
		
		if ($xdatabase->query($sql) === FALSE) 
		{
			$err_nya = $xdatabase->error;
			$xdatabase->close();
			echo "ERROR";
		}
		else
		{
			$xdatabase->close();
			echo "CREATE OKE";
		}
?>