pesan_barang_process.php 457 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
<?php

session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';

$id_barang = $_GET['id'];
$id_user = get_session('id');
$jumlah = $_POST['jumlah'];
10
$query = 'INSERT INTO pesanan( `id_user`, `id_menu`, `jumlah`) VALUES(?, ?, ?)';
11 12
//die($id_barang . $id_user . $jumlah);

13
$statement = $conn->prepare($query);
14 15 16
$statement->bind_param('iii', $id_user, $id_barang, $jumlah);
$statement->execute();

17
redirect('pesanan.php');
18
?>