Commit b9d03579 by Roy Junedi Simamora

penambahan checkout proses

parent c88a9bc1
<?php
include 'koneksi.php';
global $total;
$member_id = $_GET['id_member'];
$query = mysqli_query($koneksi, "SELECT menu.harga, pemesanan.jumlah FROM menu
INNER JOIN (pemesanan INNER JOIN member ON member_id = id_member) ON menu_id= id_menu WHERE member_id= '$id_member'");
while($row = mysqli_fetch_assoc($query)){
$jumlah = $row['jumlah'] * $row['harga'];
$total = $total += $jumlah;
}
$bukti = $_FILES['bukti']['name'];
move_uploaded_file($_FILES['bukti']['tmp_name'], 'picture/'. $bukti);
mysqli_query($koneksi, "INSERT INTO pembayaran VALUES('', '$member_id', '$total_harga', '$bukti') ");
header('Location: bayar.php?id_member='. $member_id);
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment