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

$sql 	= mysql_query("SELECT * FROM stock WHERE kode_st= '$kode' ORDER BY kode_st");
$r		= mysql_fetch_array($sql);
$data['kodest']	= $r[kode_st];
$data['namast']	= $r[nama_st];
$data['satuan']	= $r[satuan];
$data['hgjual']	= $r[hg_jual];
$data['hgbeli']	= $r[hb_akhir];
echo json_encode($data);
?>