sorry for my bad english..
<?php
define('INCLUDE_CHECK',1);
require "../mysql.php";
if(!$_POST['img']) die("There is no such product!");
$img=mysql_real_escape_string(end(explode('/',$_POST['img'])));
$row=mysql_fetch_assoc(mysql_query("SELECT * FROM tabel_barang WHERE gambar_barang='".$img."' and JUMLAH_BARANG>=0"));
$jumlah_stok = mysql_query("select count(*) as jumlah_barang from tabel_barang");
$info = mysql_fetch_array($jumlah_stok);
$jumlah_jual = $info["jumlah_barang"];
$jo = $jumlah_jual;
echo '{status:1,id:'.$row['ID_BARANG'].',price:'.$row['HARGA_BARANG'].',txt:\'\
\
<table width="100%" id="table_'.$row['ID_BARANG'].'">\
<tr>\
<td width="60%">'.$row['NAMA_BARANG'].'</td>\
<td width="10%">$'.$row['HARGA_BARANG'].'</td>\
<td width="15%"><select name="'.$row['ID_BARANG'].'_cnt" id="'.$row['ID_BARANG'].'_cnt" onchange="change('.$row['ID_BARANG'].');">\
<option value="1">1</option>\
<option value="2">2</option>\
<option value="3">3</option></select>\
\
</td>\
<td width="15%"><a href="#" onclick="remove('.$row['ID_BARANG'].');return false;" class="remove">remove</a></td>\
</tr>\
</table>\'}';
?>