One Hat Cyber Team
Your IP :
216.73.216.186
Server IP :
91.108.106.45
Server :
Linux in-mum-web1837.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
u322583024
/
domains
/
awaha.in
/
public_html
/
Edit File:
save-order.php
<?php session_name('vaishnavi_awaha'); session_start(); require_once 'admin/connection.inc.php'; // Include database connection if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Get order details from the client-side $orderDetails = json_decode(file_get_contents('php://input'), true); $total_amount = $orderDetails['total_amount']; $payment_method = $orderDetails['payment_method']; $cart_items = $orderDetails['cart_items']; // Generate unique order ID $order_id = 'AWAHAORD-' . strtoupper(uniqid()); // Insert the order into the database $query = "INSERT INTO orders (order_id, user_id, total_amount, payment_method, order_status) VALUES (?, ?, ?, ?, 'Pending')"; $stmt = $conn->prepare($query); $stmt->bind_param("sdsd", $order_id, $_SESSION['user_id'], $total_amount, $payment_method); if ($stmt->execute()) { // Return order ID after saving echo json_encode(['success' => true, 'order_id' => $order_id]); } else { echo json_encode(['success' => false]); } } ?>
Simpan