<LINK href="images/index.css" rel="stylesheet" type="text/css">

<?PHP
$p_judul1 = $_POST["p_judul"];
$p_pengarang1 = $_POST["p_pengarang"];
$p_issbn1 = $_POST["p_issbn"];
$p_dicetak1 = $_POST["p_dicetak"];
$p_jmlh1 = $_POST["p_jmlh"];
$p_kat1 = $_POST["p_kat"];
$p_sumber1 = $_POST["p_sumber"];
$error = "";
if ($p_judul1 == ""){$error = "Judul Buku harus diisi<BR>";}
if ($p_pengarang1 == ""){$error = "Pengarang Buku Diisi!.<BR>";}
//if ($p_issbn1 == ""){$error = "ISSBN BELUM DI ISI<BR>";}
if ($p_dicetak1 == ""){$error = "Buku Dicetak tahun.<BR>";}
if ($p_jmlh1 == ""){$error = "Jumlah buku.<BR>";}
if ($p_kat1 == ""){$error = "Kategori Belum diisi.<BR>";}
if ($p_sumber1 == ""){$error = "Sumber perolehan.<BR>";}
include("perpus_postdb.php");
if ($error == ""){
$query = "INSERT INTO $mytable(p_judul, p_pengarang, p_issbn, p_dicetak, p_jmlh, p_kat, p_sumber) VALUES ('$p_judul1','$p_pengarang1','$p_issbn1','$p_dicetak1','$p_jmlh1','$p_kat1','$p_sumber1')";
$result = mysql_query($query);
print ('<table width="90%"  border="0" align="center" cellpadding="4" cellspacing="4">
  <tr>
    <td colspan="3"><strong>KATALOG BARU BERHASIL DI POSTING </strong></td>
  </tr>
  <tr>
    <td width="21%">&nbsp;</td>
    <td width="3%">&nbsp;</td>
    <td width="76%">&nbsp;</td>
  </tr>
  <tr>
    <td>Judul Buku </td>
    <td><div align="center">:</div></td>
    <td>'.$p_judul1.'</td>
  </tr>
  <tr>
    <td>Pengarang</td>
    <td><div align="center">:</div></td>
    <td>'.$p_pengarang1.'</td>
  </tr>
  <tr>
    <td>ISSBN</td>
    <td><div align="center">:</div></td>
    <td>'.$p_issbn1.'</td>
  </tr>
  <tr>
    <td>Cetakan Tahun </td>
    <td><div align="center">:</div></td>
    <td>'.$p_dicetak1.'</td>
  </tr>
  <tr>
    <td>Jumlah Buku </td>
    <td><div align="center">:</div></td>
    <td>'.$p_jmlh1.'</td>
  </tr>
  <tr>
    <td>Kategori/Klasifikasi</td>
    <td><div align="center">:</div></td>
    <td>'.$p_kat1.'</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"><a href="perpus_post.php" class="menu">POSTING BUKU BARU</a></td>
  </tr>
</table>');
}
else
{
echo "$error.";
} 
?>
