mirror of
https://github.com/t404owo/t404null.git
synced 2025-12-13 18:38:47 +00:00
Fixed twitter link
This commit is contained in:
42
contacts/question-submitted.php
Normal file
42
contacts/question-submitted.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if(isset($_POST['submit'])) {
|
||||
$mailto = "hmawebdesign@hotmail.com"; //My email address
|
||||
//getting customer data
|
||||
$name = $_POST['name']; //getting customer name
|
||||
$fromEmail = $_POST['email']; //getting customer email
|
||||
$phone = $_POST['tel']; //getting customer Phome number
|
||||
$subject = $_POST['subject']; //getting subject line from client
|
||||
$subject2 = "Confirmation: Message was submitted successfully | HMA WebDesign"; // For customer confirmation
|
||||
|
||||
//Email body I will receive
|
||||
$message = "Cleint Name: " . $name . "\n"
|
||||
. "Phone Number: " . $phone . "\n\n"
|
||||
. "Client Message: " . "\n" . $_POST['message'];
|
||||
|
||||
//Message for client confirmation
|
||||
$message2 = "Dear" . $name . "\n"
|
||||
. "Thank you for contacting us. We will get back to you shortly!" . "\n\n"
|
||||
. "You submitted the following message: " . "\n" . $_POST['message'] . "\n\n"
|
||||
. "Regards," . "\n" . "- HMA WebDesign";
|
||||
|
||||
//Email headers
|
||||
$headers = "From: " . $fromEmail; // Client email, I will receive
|
||||
$headers2 = "From: " . $mailto; // This will receive client
|
||||
|
||||
//PHP mailer function
|
||||
|
||||
$result1 = mail($mailto, $subject, $message, $headers); // This email sent to My address
|
||||
$result2 = mail($fromEmail, $subject2, $message2, $headers2); //This confirmation email to client
|
||||
|
||||
//Checking if Mails sent successfully
|
||||
|
||||
if ($result1 && $result2) {
|
||||
$success = "Your Message was sent Successfully!";
|
||||
} else {
|
||||
$failed = "Sorry! Message was not sent, Try again Later.";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user