File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/csboutiquehotel.com/mail.php
Back
<?php error_reporting(0); // Only process POST reqeusts. if ($_SERVER["REQUEST_METHOD"] == "POST") { // Get the form fields and remove whitespace. $name = strip_tags(trim($_POST["name"])); $phone = filter_var(trim($_POST["phone"]), FILTER_SANITIZE_EMAIL); $email = trim($_POST["email"]); $message = trim($_POST["message"]); // Set the recipient email address. // FIXME: Update this to your desired email address. $to = "info@millenniumhotel.co.in"; $subject = "Website Contact Form Request"." ".$name; $headers = "From: $name\r\n"; $headers .= "CC: info@asiatechhotels.com\r\n"; $headers .= "BCC: pv@asiatech.in\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; // Build the email content. $email_content=' <div style="border:3px solid 98bc6c; width:80%;display:block;margin: 0px auto;"> <div> <span style="font-size:20pt;">Hotel Millennium</span><br /> <span style="color:#FCAF17;font-size:15pt;">Manali</span><br /> <table cellspacing="0" style="width:100%;height:200px;"><tr style="background-color: #97BB6A;color:#fff;"><td colspan="2">The details are as follows.</td></tr> <tr><td style="border:1px solid #000000;padding:5px;font-weight:bold;">Name</td><td style="border:1px solid #000000;padding:5px;">'.$name.'</td></tr> <tr><td style="border:1px solid #000000;padding:5px;font-weight:bold;">Phone</td><td style="border:1px solid #000000;padding:5px;">'.$phone.'</td></tr> <tr><td style="border:1px solid #000000;padding:5px;font-weight:bold;">Email Id</td><td style="border:1px solid #000000;padding:5px;">'.$email.'</td></tr> <tr><td style="border:1px solid #000000;padding:5px;font-weight:bold;">Message</td><td style="border:1px solid #000000;padding:5px;">'.$message.'</td></tr> </table><br> Thank you<br /> <span style="color:green;"><a href="http://www.asiatech.in/">AsiaTech Inc</a></span> </div> </div>'; // Send the email. if (mail($to, $subject, $email_content, $headers)) { $previous = $_SERVER['HTTP_REFERER']; header("Refresh: 3;url=".$previous.""); echo "Thank You! Your Message has been sent.<br>"; echo "Your will be redirected back to previous page in 3 seconds.<br>"; echo "If you are not redirected yet <a href='".$previous."'>click here</a>."; } else { // Set a 500 (internal server error) response code. echo "Oops! Something went wrong and we couldn't send your message."; } } else { // Not a POST request, set a 403 (forbidden) response code. echo "There was a problem with your submission, please try again."; } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings