<LINK href="images/index.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
    function refreshAndClose() {
        window.opener.location.reload(true);
        window.close();
    }
</script>
<body onbeforeunload="refreshAndClose();">
<?php
include("index.db.php");
$mytable = $_POST["table"];
$ukey1 = $_POST["ukey"];
$rb1 = $_POST["rb"];
$pdm1 = $_POST["pdm"];
$namabarang1 = $_POST["namabarang"];
$ijinsita1 = $_POST["ijinsita"];
$lokasi1 = $_POST["lokasi"];
$error = "";
if ($rb1 == ""){$error = "NO REGISTER BB BELUM DI INPUT<BR>";}
if ($pdm1 == ""){$error = "NOMOR PERKARA BELUM DI INPUT<BR>";}
if ($namabarang1 == ""){$error = "NAMA BARANG BELUM DI INPUT<BR>";}
if ($ijinsita1 == ""){$error = "IJIN SITA BELUM DI INPUT<BR>";}
if ($lokasi1 == "0"){$error = "LOKASI BELUM DI PILIH<BR>";}

$query = "UPDATE $mytable Set RB = '$rb1' where UKEY = '$ukey1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable Set PDM = '$pdm1' where UKEY = '$ukey1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable Set NAMABARANG= '$namabarang1' where UKEY = '$ukey1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable Set IJINSITA = '$ijinsita1' where UKEY = '$ukey1'";  
$result = mysql_query($query); 
$query = "UPDATE $mytable Set LOKASI = '$lokasi1' where UKEY = '$ukey1'";  
$result = mysql_query($query); 
print ('<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td bgcolor="#993300"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td bgcolor="#FF6600">INPUT BB BERHASIL DIUPDATE SILAHKAN TUTUP JENDELA INI</td>
      </tr>
    </table></td>
  </tr>
</table>');

?>


