bayar_process.php 450 Bytes
Newer Older
DESKTOP-4R50ASQ\DELL committed
1 2 3 4 5 6 7 8
<?php

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


$id = get_session('id');
9
mysqli_query($conn, "DELETE FROM pesanan WHERE id_user=$id");
DESKTOP-4R50ASQ\DELL committed
10 11 12 13 14 15


$harga = $_GET['harga'];
$id = get_session('id');
$query = 'INSERT INTO pembayaran( `id_user`, `total`) VALUES(?, ?)';

16
$statement = $conn->prepare($query);
DESKTOP-4R50ASQ\DELL committed
17 18 19 20
$statement->bind_param('is', $id, $harga);
$statement->execute();
redirect('index.php#pembayaran');
?>