<LINK href="../images/index.css" rel="stylesheet" type="text/css">
<?PHP
//$i_tgl1=date("d/m/Y");
$agenda1 = $_POST["agenda"];
$nama1 = $_POST["nama"];
$alamat1 = $_POST["alamat"];
$total1 = $_POST["total"];
$perkara1 = $_POST["perkara"];
//$i_identitas1="{$_POST[a1]}|{$_POST[a2]}|{$_POST[a3]}|{$_POST[a4]}|{$_POST[a5]}|{$_POST[a6]}|{$_POST[a7]}|{$_POST[a8]}|{$_POST[a9]}|{$_POST[a10]}|{$_POST[a11]}|{$_POST[a12]}";
$error = "";
if ($agenda1 == ""){$error = "No AGENDA TIDAK BOLEH KOSONG<BR>";}
if ($nama1 == ""){$error = "NAMA TERTAGIH TIDAK BOLEH KOSONG<BR>";}
if ($alamat1  == ""){$error = "ALAMAT TERTAGIH TIDAK BOLEH KOSONG<BR>";}
if ($total1 == ""){$error = "Total TIDAK BOLEH KOSONG<BR>";}
if ($perkara1 == ""){$error = "Perkara TIDAK BOLEH KOSONG<BR>";}
include("index.db.php");
$mytable = "setorankat";
$query = "Select * from $mytable where d_agenda = '$agenda1'";
$result = mysql_query($query); 
if ($row = mysql_fetch_array($result)){ 
if  ($row["d_agenda"] == $agenda1){$error = "$error TIDAK BOLEH ADA DUPLIKASI/NOMOR AGENDA GANDA YAITU NO AGENDA : $agenda1'<br><br>SOLUSI : REFRESH / LOGOUT TERLEBIH DAHULU\n";}
}
if ($error == ""){
$query = "INSERT INTO $mytable (d_agenda,d_nama,d_alamat,d_totaltagihan,d_dlmperkara) VALUES ('$agenda1','$nama1','$alamat1','$total1','$perkara1')";
$result = mysql_query($query);
print ('<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td><a href="../index.page.php?g=setoranpost&d=inc" class="menudatun">PENAMBAHAN NAMA TERTAGIH BERHASIL DISIMPAN KLIK UNTUK KEMBALI<a></td>
      </tr>
    </table></td>
  </tr>
</table>');

}
else
{
echo "$error.";
} 
?>

