perbaikan

parent 89583d60
......@@ -21,8 +21,8 @@
<h5>Data Buku</h5>
<?php
$id_buku = mysqli_real_escape_string($koneksi, $_GET['id']);
$cari = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE isbn='$id_buku'")or die(mysqli_error());
while($data = mysqli_fetch_array($cari)) {
$cari = mysqli_query($koneksi, "SELECT * FROM t_buku, t_penerbit WHERE isbn='$id_buku'")or die(mysqli_error());
$data = mysqli_fetch_array($cari);
?>
<form action="editbook_process.php" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id" placeholder="ISBN" value="<?php echo $data['isbn'] ?>" >
......@@ -31,11 +31,20 @@
<b><br>Nama Pengarang :</b>
<input type="text" name="pengarang" placeholder="Nama Pengarang" value="<?php echo $data['pengarang'] ?>" required/>
<b><br>Nama Penerbit :</b>
<input type="text" name="penerbit" placeholder="Nama Penerbit" value="<?php echo $data['penerbit'] ?>" required/>
<input type="text" name="penerbit" placeholder="Nama Penerbit" value="<?php echo $data['nama_penerbit'] ?>" required/>
<b><br>Kategori Buku :</b>
<input type="text" name="kategori" placeholder="Kategori Buku" value="<?php echo $data['kategori'] ?>" required/>
<select class="form-control" name="kategori">
<?php
$kategori = mysqli_query($koneksi, "SELECT * FROM t_kategori ORDER BY id_kategori");
while($data = mysqli_fetch_array($kategori)) {
?>
<option value="<?= $data['id_kategori'];?>"><a href="categories.php?kd="><i class="fa fa-arrow-right" aria-hidden="true"></i><?php echo $data['nama_kategori']; ?></option>
<?php
}
?>
</select>
<b><br>Tahun Terbit :</b>
<input type="text" name="tahun" placeholder="Tahun Terbit" value="<?php echo $data['tahun'] ?>" required/>
<input type="text" name="tahun" placeholder="Tahun Terbit" value="<?php echo $data['tahun']; ?>" required/>
<b><br>Harga per Eksemplar :</b>
<input type="text" name="harga" placeholder="Harga per Eksemplar" value="<?php echo $data['harga'] ?>" required/>
<b><br>Jumlah Tersedia :</b>
......@@ -48,10 +57,7 @@
</div><br>
<input type="file" name="gambar" accept="img/*" value="<?php echo $data['gambar']; ?>" required/>
<input type="submit" name="edit" value="edit">
</form>
<?php
}
?>
</form>
</div>
<div class="register-home">
<a href="processbook.php">BATAL</a>
......
......@@ -30,7 +30,7 @@
<!-- breadcrumbs -->
<div class="breadcrumbs">
<div class="container">
<?php
<!-- <?php
if(isset($_POST['cari'])){
$cari = $_POST['search'];
$sql = mysqli_query($koneksi, "SELECT * FROM t_buku WHERE judul LIKE '%$cari%' ORDER BY isbn");
......@@ -44,7 +44,7 @@
</button>
<div class="clearfix"></div>
</form>
</div>
</div> -->
</div>
</div>
<!-- //breadcrumbs -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment