<?php
include "../../inc/inc.koneksi.php";
$kode	= $_POST['kode'];
$exp	= explode(";",$kode);
$kodeop	= $exp['0'];
$kodest	= $exp['1'];

$sql= mysql_query("SELECT * FROM st_opname WHERE kode_op= '$kodeop' AND kode_st='$kodest'");
$r  = mysql_fetch_assoc($sql);
$data['kodest']	= $r['kode_st'];
$data['namast'] = $r['nama_st'];
$data['satuan'] = $r['satuan'];
$data['jmlstok']= $r['jml_stok'];
$data['jmlopn'] = $r['jml_opn'];
$data['hgbeli']	= $r['hg_beli'];	
echo json_encode($data);
?>