ok
Direktori : /home/importfo/public_html/inddigmedia.in/inquiry/ |
Current File : /home/importfo/public_html/inddigmedia.in/inquiry/send_mail.php |
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { // Collect form data $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; // Prepare the email content $to = "info@inddigmedia.com"; // The recipient email address $subject = "New Inquiery from Website"; $body = "You have received a new message from the website contact form:\n\n"; $body .= "Name: $name\n"; $body .= "Email: $email\n"; $body .= "Phone: $phone\n"; $body .= "Message: $message\n"; $headers = "From: $email"; // Send the email if (mail($to, $subject, $body, $headers)) { echo ("<script LANGUAGE='JavaScript'>window.location.href='thank-you-page.php';</script>"); } else { echo "Oops! Something went wrong, please try again later."; } } ?>