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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
editbook.php
editbook.php
+14
-8
index.php
index.php
+2
-2
No files found.
editbook.php
View file @
7575fa5d
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
<h5>
Data Buku
</h5>
<h5>
Data Buku
</h5>
<?php
<?php
$id_buku
=
mysqli_real_escape_string
(
$koneksi
,
$_GET
[
'id'
]);
$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
());
$cari
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku
, t_penerbit
WHERE isbn='
$id_buku
'"
)
or
die
(
mysqli_error
());
while
(
$data
=
mysqli_fetch_array
(
$cari
))
{
$data
=
mysqli_fetch_array
(
$cari
);
?>
?>
<form
action=
"editbook_process.php"
method=
"POST"
enctype=
"multipart/form-data"
>
<form
action=
"editbook_process.php"
method=
"POST"
enctype=
"multipart/form-data"
>
<input
type=
"hidden"
name=
"id"
placeholder=
"ISBN"
value=
"
<?php
echo
$data
[
'isbn'
]
?>
"
>
<input
type=
"hidden"
name=
"id"
placeholder=
"ISBN"
value=
"
<?php
echo
$data
[
'isbn'
]
?>
"
>
...
@@ -31,11 +31,20 @@
...
@@ -31,11 +31,20 @@
<b><br>
Nama Pengarang :
</b>
<b><br>
Nama Pengarang :
</b>
<input
type=
"text"
name=
"pengarang"
placeholder=
"Nama Pengarang"
value=
"
<?php
echo
$data
[
'pengarang'
]
?>
"
required
/>
<input
type=
"text"
name=
"pengarang"
placeholder=
"Nama Pengarang"
value=
"
<?php
echo
$data
[
'pengarang'
]
?>
"
required
/>
<b><br>
Nama Penerbit :
</b>
<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>
<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>
<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>
<b><br>
Harga per Eksemplar :
</b>
<input
type=
"text"
name=
"harga"
placeholder=
"Harga per Eksemplar"
value=
"
<?php
echo
$data
[
'harga'
]
?>
"
required
/>
<input
type=
"text"
name=
"harga"
placeholder=
"Harga per Eksemplar"
value=
"
<?php
echo
$data
[
'harga'
]
?>
"
required
/>
<b><br>
Jumlah Tersedia :
</b>
<b><br>
Jumlah Tersedia :
</b>
...
@@ -49,9 +58,6 @@
...
@@ -49,9 +58,6 @@
<input
type=
"file"
name=
"gambar"
accept=
"img/*"
value=
"
<?php
echo
$data
[
'gambar'
];
?>
"
required
/>
<input
type=
"file"
name=
"gambar"
accept=
"img/*"
value=
"
<?php
echo
$data
[
'gambar'
];
?>
"
required
/>
<input
type=
"submit"
name=
"edit"
value=
"edit"
>
<input
type=
"submit"
name=
"edit"
value=
"edit"
>
</form>
</form>
<?php
}
?>
</div>
</div>
<div
class=
"register-home"
>
<div
class=
"register-home"
>
<a
href=
"processbook.php"
>
BATAL
</a>
<a
href=
"processbook.php"
>
BATAL
</a>
...
...
index.php
View file @
7575fa5d
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<!-- breadcrumbs -->
<!-- breadcrumbs -->
<div
class=
"breadcrumbs"
>
<div
class=
"breadcrumbs"
>
<div
class=
"container"
>
<div
class=
"container"
>
<?php
<
!--
<
?php
if
(
isset
(
$_POST
[
'cari'
])){
if
(
isset
(
$_POST
[
'cari'
])){
$cari
=
$_POST
[
'search'
];
$cari
=
$_POST
[
'search'
];
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku WHERE judul LIKE '%
$cari
%' ORDER BY isbn"
);
$sql
=
mysqli_query
(
$koneksi
,
"SELECT * FROM t_buku WHERE judul LIKE '%
$cari
%' ORDER BY isbn"
);
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</button>
</button>
<div class="clearfix"></div>
<div class="clearfix"></div>
</form>
</form>
</div>
</div>
-->
</div>
</div>
</div>
</div>
<!-- //breadcrumbs -->
<!-- //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