One Hat Cyber Team
Your IP :
216.73.216.186
Server IP :
91.108.106.74
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
/
View File Name :
send-order-email.php
<?php // Include your database connection (assuming PDO) include('db_connection.php'); // Replace with your actual db connection code if ($_SERVER['REQUEST_METHOD'] == 'POST') { // Get the form data from the AJAX request $email = $_POST['email']; $orderId = $_POST['order_id']; // Fetch order details from the database $sql = "SELECT order_id, total_amount, payment_status, payment_method, billing_name, billing_address, billing_city, billing_state, billing_zip, billing_phone FROM orders WHERE order_id = :order_id"; $stmt = $pdo->prepare($sql); $stmt->execute(['order_id' => $orderId]); $order = $stmt->fetch(); if ($order) { // Prepare email details $subject = "Order Details - Order ID: " . $order['order_id']; $message = " <html> <head> <title>Order Details</title> </head> <body> <h2>Order Details</h2> <p><strong>Order ID:</strong> " . $order['order_id'] . "</p> <p><strong>Billing Name:</strong> " . $order['billing_name'] . "</p> <p><strong>Billing Address:</strong> " . $order['billing_address'] . "</p> <p><strong>Billing City:</strong> " . $order['billing_city'] . "</p> <p><strong>Billing State:</strong> " . $order['billing_state'] . "</p> <p><strong>Billing Zip:</strong> " . $order['billing_zip'] . "</p> <p><strong>Billing Phone:</strong> " . $order['billing_phone'] . "</p> <p><strong>Total Amount:</strong> ₹" . $order['total_amount'] . "</p> <p><strong>Payment Status:</strong> " . $order['payment_status'] . "</p> <p><strong>Payment Method:</strong> " . $order['payment_method'] . "</p> </body> </html>"; // Set the headers for HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-Type: text/html; charset=UTF-8" . "\r\n"; $headers .= "From: no-reply@yourdomain.com" . "\r\n"; // Sender email address // Send the email if (mail($email, $subject, $message, $headers)) { echo "Email sent successfully."; } else { echo "Failed to send email."; } } else { echo "Order not found."; } } ?>