Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA1-1617-D3TI05
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
Fredrick Mangampu Theodorus Pardosi
PA1-1617-D3TI05
Commits
bc5444d5
Commit
bc5444d5
authored
May 17, 2017
by
DESKTOP-4R50ASQ\DELL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pembayaran
parent
351fd025
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
bayar.php
bayar.php
+42
-0
bayar_process.php
bayar_process.php
+21
-0
No files found.
bayar.php
0 → 100644
View file @
bc5444d5
<?php
//session_start();
include_once
'functions/fungsi.php'
;
include_once
'connection/koneksi.php'
;
$query
=
"SELECT menu.harga as harga, pesanan.jumlah as jumlah FROM pesanan INNER JOIN menu ON pesanan.id_menu = menu.id"
;
$result_set
=
$database
->
query
(
$query
);
?>
<body>
<div
class=
"checkout grid_16"
>
<div
class=
"billInfo grid_11 alpha"
>
<h4>
Daftar Pesanan
</h4><br>
</div>
</div>
<br>
<p>
<table
border=
"2px"
>
<tr>
<td>
Total harga
</td>
</tr>
<?php
$total
=
0
;
while
(
$row
=
$result_set
->
fetch_array
())
{
$total
=
$total
+
(
$row
[
'harga'
]
*
$row
[
'jumlah'
]);
}
?>
<tr><td>
<?=
$total
?>
</td></tr>
</table>
<a
href=
"bayar_process.php?harga=
<?=
$total
?>
"
>
oke
</a>
</p>
</div>
</div>
</div>
<div
class=
"clear"
></div>
</div>
</body>
\ No newline at end of file
bayar_process.php
0 → 100644
View file @
bc5444d5
<?php
session_start
();
include_once
'functions/fungsi.php'
;
include_once
'connection/koneksi.php'
;
$id
=
get_session
(
'id'
);
mysqli_query
(
$database
,
"DELETE FROM pesanan WHERE id_user=
$id
"
);
$harga
=
$_GET
[
'harga'
];
$id
=
get_session
(
'id'
);
$query
=
'INSERT INTO pembayaran( `id_user`, `total`) VALUES(?, ?)'
;
$statement
=
$database
->
prepare
(
$query
);
$statement
->
bind_param
(
'is'
,
$id
,
$harga
);
$statement
->
execute
();
redirect
(
'index.php#pembayaran'
);
?>
\ 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