prepare("SELECT c.*, ci.image_path FROM cars c LEFT JOIN car_images ci ON c.id = ci.car_id AND ci.is_main = 1 WHERE c.id = ? AND c.status = 'approved'"); $stmt->execute([$id]); $car = $stmt->fetch(); if (!$car) { header('Location: cars.php'); exit; } $success = false; $error = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $name = $_POST['buyer_name'] ?? ''; $phone = $_POST['buyer_phone'] ?? ''; $bank_id = $_POST['bank_id'] ?? ''; $personal_info = $_POST['personal_info'] ?? ''; $email = $_SESSION['user_email'] ?? ''; $stmt = $pdo->prepare("INSERT INTO purchases (car_id, user_id, buyer_name, buyer_email, buyer_phone, bank_id, personal_info, status) VALUES (?, ?, ?, ?, ?, ?, ?, 'pending')"); if ($stmt->execute([$id, $_SESSION['user_id'], $name, $email, $phone, $bank_id, $personal_info])) { $success = true; } else { $error = "Failed to submit request. Please try again."; } } ?>
🚀

Request Submitted!

Your purchase request for the with Bank ID has been sent to our admin for review. Once approved, you will receive a confirmation receipt.

Go to Dashboard Back to Marketplace

Purchase Summary

Model -

Total Price $

Buyer Verification

Please provide your banking and personal information to initiate the purchase process.

This ID will be used to verify your transaction.

Note: By submitting this request, you agree to the verification process. After admin approval, a sale receipt will be generated.

Cancel