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

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

$data['tanggal']= $r['tanggal'];
$data['kodecab']= $r['kode_cab'];
$data['kodesp']	= $r['kode_sp'];
$data['namasp']	= $r['nama_sp'];
echo json_encode($data);
?>