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

$kode	= $_POST[kode];
$text	= "SELECT * FROM st_opname WHERE kode_op= '$kode' GROUP BY kode_op";
$sql 	= mysql_query($text);
$row	= mysql_num_rows($sql);
if ($row>0){
	while ($r=mysql_fetch_array($sql)){
		$tgl	= $r[tanggal];
		$gudang	= $r[gudang];
	}
	$data['tgl']	= $tgl;
	$data['gudang']	= $gudang;
	echo json_encode($data);
}else{
	$data['tgl']	= '';
	$data['gudang'] = '';
	echo json_encode($data);
}
?>