Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
RestoranPondokEdo
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
Mei Romauli Sagala
RestoranPondokEdo
Commits
a54f3094
Commit
a54f3094
authored
May 16, 2017
by
Roy Junedi Simamora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaikan daftar komentar
parent
f2a68c3b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
0 deletions
+102
-0
cek_comment.php
cek_comment.php
+23
-0
daftar_komen.php
daftar_komen.php
+32
-0
form_comment.php
form_comment.php
+47
-0
No files found.
cek_comment.php
0 → 100644
View file @
a54f3094
<?php
include
(
'koneksi.php'
);
include
(
'common/header.php'
);
if
(
isset
(
$_POST
[
'kirim'
]))
{
$nama
=
$_POST
[
'name'
];
$hp
=
$_POST
[
'phone'
];
$email
=
$_POST
[
'email'
];
$comment
=
$_POST
[
'comment'
];
}
$input
=
mysql_query
(
"INSERT INTO komentar VALUES('','
$nama
','
$comment
','
$email
','
$hp
')"
)
or
die
(
mysql_error
());
if
(
$input
)
{
header
(
'Location: form_comment.php'
);
}
else
{
echo
'gagal mengirimkan komentar'
;
header
(
"location:form_comment.php"
);
}
include
'common/footer.php'
;
?>
\ No newline at end of file
daftar_komen.php
0 → 100644
View file @
a54f3094
<?php
require
'koneksi.php'
;
include
'common/header.php'
;
?>
<div
class=
"container-fluid"
>
<h2>
Daftar Feedback
</h2>
<hr/>
<?php
$komen
=
mysql_query
(
'SELECT * FROM komentar'
);
while
(
$q
=
mysql_fetch_array
(
$komen
)){
?>
<div
class=
'col-md-4'
>
<div
class=
"thumbnail"
>
<label>
Nama :
<span>
<?php
echo
$q
[
'nama'
];
?>
</span>
</label>
<br/>
<label>
<span>
<?php
echo
$q
[
'email'
]
?>
</span>
</label><br/>
<label>
Komentar :
</label>
<br/>
<?php
echo
$q
[
'isi'
]
?>
<br/>
<div
align=
"center"
>
<a
onclick=
'if(confirm("Anda yakin ingin menghapus komentar ini")){
location.href= "hapus_komen.php?id=
<?php
echo
$q
[
'id_komentar'
]
?>
"}'
class=
"btn btn-danger"
>
<span
class=
"glyphicon glyphicon-remove"
></span>
Hapus
</a>
</div>
</div>
</div>
<?php
}
?>
</div>
<?php
include
'common/footer.php'
;
?>
\ No newline at end of file
form_comment.php
0 → 100644
View file @
a54f3094
<?php
require_once
(
dirname
(
__FILE__
)
.
'/koneksi.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/common/header.php'
);
?>
<form
class=
"well form-horizontal"
action=
"cek_comment.php"
method=
"post"
id=
"contact_form"
>
<fieldset>
<legend>
Berikan kritik dan saran anda pada kolom dibawah ini
</legend>
<div
class=
"form-group"
>
<label
class=
"col-md-4 control-label"
>
Nama
</label>
<div
class=
"col-md-4 inputGroupContainer"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"glyphicon glyphicon-user"
></i></span>
<input
name=
"name"
required
placeholder=
"Isi Nama Anda"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-md-4 control-label"
>
Hp
</label>
<div
class=
"col-md-4 inputGroupContainer"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"glyphicon glyphicon-earphone"
></i></span>
<input
name=
"phone"
required
placeholder=
"Nomor Handphone"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-md-4 control-label"
>
E-Mail
</label>
<div
class=
"col-md-4 inputGroupContainer"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"glyphicon glyphicon-envelope"
></i></span>
<input
name=
"email"
required
placeholder=
"E-Mail"
class=
"form-control"
type=
"text"
>
</div>
</div>
</div>
<div
class=
"form-group col-md-8"
style=
"margin-top: 20px;margin-left: 15px;"
>
<label
for=
"comment"
required
>
Kritik Dan Saran:
</label></div>
<textarea
class=
"form-control"
rows=
"5"
id=
"comment"
name=
"comment"
placeholder=
"Masukkan Ulasan Anda"
></textarea><br>
<button
type=
"submit"
class=
"btn btn-primary"
name=
"kirim"
>
Kirim
<span
class=
"glyphicon glyphicon-send"
></span></button>
</fieldset>
</form>
<?php
require_once
(
dirname
(
__FILE__
)
.
'/common/footer.php'
);
?>
\ No newline at end of file
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