<?php
include "../koneksi.php";

$pbb_id = $_POST['pbb_id'];
$plan_id = $_POST['plan_id'];
$mat_id = $_POST['mat_id'];
$lot = $_POST['lot'];
$bag = $_POST['bag'];

if (empty($data['error'])) {
		$query = "UPDATE pbb SET
								Lot = '$lot',
								Bag = '$bag'
								WHERE PBB_ID = '$pbb_id'
								";

		mysqli_query($koneksi, $query)
		or die ("Gagal Perintah SQL".mysql_error());
		
		
    $data['hasil'] = 'sukses';
    
} else {
    
    $data['hasil'] = 'gagal';
}
	
echo json_encode($data);
header('Location:pbb.php?id='.$plan_id.'&mat='.$mat_id);

?>

