Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA1-1617-D3TI107
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Franciskus Partogu Hamonangan Napitupulu
PA1-1617-D3TI107
Commits
7575fa5d
Commit
7575fa5d
authored
May 26, 2017
by
Franciskus Partogu Hamonangan Napitupulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaikan
parent
89583d60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
editbook.php
editbook.php
+15
-9
index.php
index.php
+2
-2
No files found.
editbook.php
View file @
7575fa5d
...
...
@@ -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>
...
...
index.php
View file @
7575fa5d
...
...
@@ -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 -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment