mirror of
https://github.com/t404owo/t404null.git
synced 2025-12-12 09:58:46 +00:00
Fixed a few stuffs...
This commit is contained in:
@@ -160,21 +160,21 @@ I write/make music (DTM), and for every releases I'll post my musics in this web
|
||||
|
||||
</div>
|
||||
<div class="row justify-content-center mt-4">
|
||||
<form action="mailto:t404owo@gmail.com" id="contact-form" novalidate="novalidate" method="post">
|
||||
<form action="https://t404null.atwebpages.com/mail/" id="contact-form" novalidate="novalidate" method="post">
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlInput1">Name</label>
|
||||
<label for="name">Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="Your name" required="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlInput1">Email</label>
|
||||
<label for="email">Email</label>
|
||||
<input type="email" class="form-control" id="email" name="email" placeholder="example@example_mail.com" required="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlInput1">Subject</label>
|
||||
<label for="subject">Subject</label>
|
||||
<input type="text" class="form-control" id="subject" name="subject" placeholder="Email Subject" required="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Message</label>
|
||||
<label for="messsage">Message</label>
|
||||
<textarea class="form-control" id="message" name="message" rows="5" placeholder="Write your message here" required=""></textarea>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-outline-primary" name="submit" id="contact-submit" data-submit="Sending...">
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<?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