<?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');
?>