<?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'];
$query = 'INSERT INTO pesanan( `id_user`, `id_menu`, `jumlah`) VALUES(?, ?, ?)';
//die($id_barang . $id_user . $jumlah);

$statement = $database->prepare($query);
$statement->bind_param('iii', $id_user, $id_barang, $jumlah);
$statement->execute();

redirect('index.php#pesanan');
?>