<?php
/*cara perbaiki xampp error Error: MySQL shutdown unexpectedly sukses 100%
1. mysqld --console --skip-grant-tables --skip-external-locking
2. mentasi table rusak 
ALTER TABLE yourtable_name DISCARD TABLESPACE ;

ALTER TABLE yourtable_name IMPORT TABLESPACE ;


https://www.youtube.com/watch?v=K7gyclhWo1Y*/
/*error_reporting(0);*/
include('../koneksi.php');
if (isset($_GET['register']) AND isset($_GET['register'])){
 
$register = $_POST['register'];
}
$kode   = $_SESSION['username'];
$rekening = $_POST['rekening'];
$tgl =  date('Y-m-d',strtotime($_POST['tgl']));
$tglsystem = $_POST['tglsystem'];
$plafond = str_replace(",", "", $_POST['plafond']);
$jcair = $_POST['jcair'];
$pbarang = $_POST['pbarang'];
$jbarang = $_POST['jbarang'];
$kelengkapan = $_POST['kelengkapan'];
$jaminan = $_POST['jaminan'];
$nohp = $_POST['nohp'];
$jwaktu = $_POST['jwaktu'];
$margin = $_POST['margin'];
$noseri = $_POST['noseri'];
$kondisi = $_POST['kondisi'];
$keterangan = $_POST['keterangan'];
$no_bukti  = $_POST['no_bukti'];


$query1 = mysqli_query($koneksi,"DELETE FROM pinjaman WHERE rekening='$rekening' AND no_bukti='$no_bukti' AND username='$kode' ")or die(mysqli_error($koneksi));
$query2 = mysqli_query($koneksi,"DELETE FROM angsuran WHERE rekening='$rekening' AND no_bukti='$no_bukti' AND username='$kode' ")or die(mysqli_error($koneksi));

$query = mysqli_query($koneksi,"DELETE FROM bukubesar WHERE no_bukti='$no_bukti' AND username='$kode' ")or die(mysqli_error($koneksi));
echo "<script type='text/javascript'>alert('Data Yang Bpk Upload Berhasil');
window.href = '../home.php?home=f14cbd957174c9ad73d33ce51523378d';
</script>";





?>
