-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact-form.php
35 lines (30 loc) · 1.18 KB
/
contact-form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
//
if(isset($_POST['submit']))
{
$to = "[email protected]"; // this is your Email address
$fname = $_POST['Name'];
$lname = $_POST['lname'];
$from = $_POST['Email']; // this is the sender's Email address
$mobile = $_POST['Phone'];
$url = $_POST['url'];
$questions = $_POST['questions'];
$subject = "Contact Form - Enquiry";
$message = "Email: " .$from."<br>"."First Name: " .$fname. "<br>"."Last Name: " .$lname. "<br>" ."url: " .$url."<br>" . "Phone: " .$mobile. "<br>" . "questions: " .$questions;
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From:" .$from. "\r\n" .
"Reply-To: [email protected]" . "\r\n" .
"X-Mailer: PHP/" . phpversion();
$success = mail($to,$subject,$message,$headers);
if( $success == true )
{
echo '<script>alert("Email has been sent successfully. we will contact you shortly.");</script>';
}
else
{
echo '<script>alert("Message could not be sent....");</script>';
}
}
echo '<script>window.location="https://bajajitsolution.com/training/sanjay/Google-Athlete/"</script>';
?>