klik untuk menyalin
👇
<?php
include 'db.php';
if($_SERVER['REQUEST_METHOD']=='POST'){
$uid = $_SESSION['user_id'];
$pid = $_POST['product_id'];
$qty = $_POST['quantity'];
$total= $_POST['total'];
$name = $_POST['customer_name'];
$wa = $_POST['customer_wa'];
$addr = $_POST['customer_adress'];
$pay = $_POST['payment_metod'];
$conn->query("INSERT INTO orders (user_id, product_id, quantity, customer_name, customer_wa, customer_adress, payment_metod, total, created_at, order_status, status_id)
VALUES ('$uid','$pid','$qty','$name','$wa','$addr','$pay','$total',NOW(),'Pending','1')");
echo "Pesanan berhasil!";
}
Komentar untuk File proses_order.php
Posting Komentar