<?php
include "../../inc/inc.koneksi.php";
$kode= $_POST['kode'];

$sql = mysql_query("SELECT * FROM interface");
$r   = mysql_fetch_assoc($sql);
$nobb	= $r['piutang'];
$noakun = $nobb.$kode;

$sql = mysql_query("SELECT * FROM customer WHERE kode_pl= '$kode'");
$row = mysql_num_rows($sql);
if ($row>0){
	mysql_query("DELETE FROM customer WHERE kode_pl= '$kode'");
	mysql_query("DELETE FROM akun_bp WHERE noakun= '$noakun'");
	echo "Data Kode paramedis kode $kode sukses dihapus.";
}else{
	echo "Maaf, tidak ada";
}
?>