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

$kode= $_POST['kode'];
$text= "SELECT * FROM stock WHERE kode_st= '$kode' ORDER BY kode_st";

$sql = mysql_query($text);
$r	 = mysql_fetch_assoc($sql);
$data['namast']= $r[nama_st];
$data['satuan']= $r[satuan];
$data['harga'] = $r[hg_beli];
$data['jmlstok']= $r[jml_stok];
echo json_encode($data);
?>