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
9b8dfb45
Commit
9b8dfb45
authored
Jun 11, 2017
by
Desi Enjelina Lubis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perbaikan form dan fungsi mengirimkan saran
parent
0bf36cc0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
contact.php
contact.php
+6
-0
contact_process.php
contact_process.php
+4
-3
deletecomment_process.php
deletecomment_process.php
+2
-1
No files found.
contact.php
View file @
9b8dfb45
...
...
@@ -38,6 +38,12 @@
<span
class=
"input__label-content input__label-content--ichiro"
>
Nama Anda...
</span>
</label>
</span>
<span
class=
"input input--ichiro"
>
<input
class=
"input__field input__field--ichiro"
type=
"email"
id=
"input-26"
name=
"email"
placeholder=
"Email Anda"
required=
""
/>
<label
class=
"input__label input__label--ichiro"
for=
"input-26"
>
<span
class=
"input__label-content input__label-content--ichiro"
>
Email Anda...
</span>
</label>
</span>
<textarea
name=
"komentar"
placeholder=
"Saran Anda..."
required=
""
></textarea>
<input
type=
"submit"
name=
"kirim"
value=
"kirim"
>
</form>
...
...
contact_process.php
View file @
9b8dfb45
...
...
@@ -2,11 +2,12 @@
include
'koneksi.php'
;
$nama_pengirim
=
$_POST
[
'nama_pengirim'
];
$email
=
$_POST
[
'email'
];
$komentar
=
$_POST
[
'komentar'
];
$query
=
mysqli_query
(
$koneksi
,
"INSERT INTO t_komentar VALUES('', '
$nama_pengirim
', '
$komentar
', NOW())"
);
$query
=
mysqli_query
(
$koneksi
,
"INSERT INTO t_komentar VALUES('', '
$nama_pengirim
', '
$
email
','
$
komentar
', NOW())"
);
if
(
$query
)
{
echo
"<script>alert('Terimakasih
$nama_pengirim
telah memberikan
masukannya !'); window.location = 'contact
.php'</script>"
;
echo
"<script>alert('Terimakasih
$nama_pengirim
telah memberikan
sarannya !'); window.location = 'index
.php'</script>"
;
}
else
{
echo
"<script>alert('
$nama_pengirim
gagal menginput
masuk
an !'); window.location = 'contact.php'</script>"
;
echo
"<script>alert('
$nama_pengirim
gagal menginput
sar
an !'); window.location = 'contact.php'</script>"
;
}
deletecomment_process.php
View file @
9b8dfb45
...
...
@@ -2,5 +2,5 @@
require_once
(
"koneksi.php"
);
$id
=
$_GET
[
'id'
];
mysqli_query
(
$koneksi
,
"DELETE FROM t_komentar where id_komentar='
$id
'"
);
echo
"<script>alert('
Komentar
berhasil dihapus');window.location = 'processcomment.php'</script>"
;
echo
"<script>alert('
Saran
berhasil dihapus');window.location = 'processcomment.php'</script>"
;
?>
\ 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