File manager - Edit - /home/asiatechinc/public_html/asiatech-websites/weddingmitra.in/quote.php
Back
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $to = "weddingmitrain@gmail.com"; $subject = "New Wedding Enquiry from Wedding Mitra"; // Basic fields $name = $_POST['name'] ?? ''; $mobile = $_POST['mobile'] ?? ''; $email = $_POST['email'] ?? ''; $budget = $_POST['budget'] ?? ''; $event_date = $_POST['event_date'] ?? ''; $guest = $_POST['guest'] ?? ''; $rooms = $_POST['rooms'] ?? ''; $city = $_POST['city'] ?? ''; $resort = $_POST['resort'] ?? ''; // Functions selected (JS should make sure they submit as array) $functions = $_POST['functions'] ?? []; $functions_list = !empty($functions) ? implode(', ', $functions) : 'None'; // Services (manually checking individual checkboxes) $services = []; if (isset($_POST['band'])) $services[] = "Wedding Band"; if (isset($_POST['makeup'])) $services[] = "Bridal Makeup"; if (isset($_POST['artists'])) $services[] = "Mehandi Artists"; if (isset($_POST['transportation'])) $services[] = "Transportation"; if (isset($_POST['safari'])) $services[] = "Jungle Safari"; if (isset($_POST['chariots'])) $services[] = "Wedding Chariots"; if (isset($_POST['pandit'])) $services[] = "Pandit Ji "; if (isset($_POST['iron'])) $services[] = "Iron Man"; if (isset($_POST['polisher'])) $services[] = "Shoe Polisher"; if (isset($_POST['saving'])) $services[] = "Saving Man"; if (isset($_POST['entertainment'])) $services[] = "Entertainment "; if (isset($_POST['led_wall'])) $services[] = "LED Wall"; if (isset($_POST['anchor'])) $services[] = "Anchor"; if (isset($_POST['bar'])) $services[] = "Molecular Bar"; if (isset($_POST['punjabi'])) $services[] = "Punjabi/Bhangra Dhol"; if (isset($_POST['photographer'])) $services[] = "Photographer"; $services_list = !empty($services) ? implode(', ', $services) : 'None'; // HTML Email Message $message = " <html> <head> <style> table { font-family: Arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #ddd; padding: 8px; } th { background-color: #f4f4f4; text-align: left; } </style> </head> <body> <h2>Wedding Enquiry Details</h2> <table> <tr><th>Name</th><td>$name</td></tr> <tr><th>Mobile</th><td>$mobile</td></tr> <tr><th>Email</th><td>$email</td></tr> <tr><th>Budget</th><td>$budget</td></tr> <tr><th>Event Date</th><td>$event_date</td></tr> <tr><th>No. of Guests</th><td>$guest</td></tr> <tr><th>Rooms Required</th><td>$rooms</td></tr> <tr><th>Preferred City</th><td>$city</td></tr> <tr><th>Resort Name</th><td>$resort</td></tr> <tr><th>Functions Selected</th><td>$functions_list</td></tr> <tr><th>Services Selected</th><td>$services_list</td></tr> </table> </body> </html> "; // Headers $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=UTF-8\r\n"; $headers .= "From: Website Enquiry <no-reply@asiatech.in>\r\n"; // Send email if (mail($to, $subject, $message, $headers)) { header("Location: thank-you.php"); exit; } else { echo "Sorry, something went wrong. Please try again later."; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings