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

$kode	= $_POST['kode'];
$sql 	= mysql_query("SELECT * FROM sopb WHERE kode_opb='$kode' GROUP BY kode_opb");
$r	 	= mysql_fetch_assoc($sql);

$data['tgl']		= $r['tanggal'];
$data['kodesp']		= $r['kode_sp'];
$data['namasp']		= $r['nama_sp'];
$data['bataskr']	= $r['batas_kr'];
$data['tanggalbk']	= $r['tanggal_bk'];
echo json_encode($data);
?>