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

$kodesp= $_POST['kodesp'];
$nobg  = $_POST['nobg'];
$text  = "SELECT * FROM hut_bg WHERE kode_sp='$kodesp' AND nobg= '$nobg'";
$sql = mysql_query($text);
$row = mysql_num_rows($sql);
if ($row>0){
while ($r=mysql_fetch_array($sql)){				
	$data['nobg']= $r[nobg];		
	echo json_encode($data);
}
}else{
	$data['nobg']= '';
	echo json_encode($data);
}
?>