prepare("SELECT * FROM cars WHERE id = ?"); $stmt->execute([$_GET['inquiry']]); $inquiry_car = $stmt->fetch(); } if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Process form (Demo only - just save to DB or show success) $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $car_id = $_POST['car_id'] ?? null; // Use the built-in mail service if desired, or just save to DB // For this "100% offline" task, saving to DB is better. $stmt = $pdo->prepare("INSERT INTO inquiries (car_id, name, email, message) VALUES (?, ?, ?, ?)"); $stmt->execute([$car_id, $name, $email, $message]); $msg = "Thank you! Your message has been sent. We will contact you shortly."; } ?>
We are here to help you find your dream car.
Shar-e-Naw, Kabul, Afghanistan
+93 700 000 000
info@afgcars.af
Sat - Thu: 8:00 AM - 6:00 PM
Friday: Closed