-
Notifications
You must be signed in to change notification settings - Fork 2
/
submit.php
87 lines (66 loc) · 2.61 KB
/
submit.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
if($_POST['news_name']){
$to = "[email protected]";
$from = $_POST["news_email_address"];
$message = " <strong>Name: </strong>".$_POST["news_name"]."<br />";
$message .= " <strong>Email Address: </strong>".$_POST["news_email_address"]."<br />";
$subject = 'Newsletter Subscription';
$headers = "From: ".$_POST["news_email_address"]."\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$send = mail($to,$subject,$message,$headers);
if($send)
{
echo "success";
}
else
{
echo "error";
}
}
if($_POST['fname']){
$to = "[email protected]";
$from = $_POST["email_address"];
$message = " <strong>Name: </strong>".$_POST["fname"]."<br />";
$message .= " <strong>Email Address: </strong>".$_POST["email_address"]."<br />";
$message .= " <strong>Subject: </strong>".$_POST["subject"]."<br />";
$message .= " <strong>Message: </strong>".$_POST["msg"]."<br />";
$subject = 'Contact Us';
$headers = "From: ".$_POST["email_address"]."\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$send = mail($to,$subject,$message,$headers);
if($send)
{
echo "success";
}
else
{
echo "error";
}
}
if($_POST['app_fname']){
$to = "[email protected]";
$from = $_POST["app_email_address"];
$message = " <strong>First Name: </strong>".$_POST["app_fname"]."<br />";
$message .= " <strong>Last Name: </strong>".$_POST["app_lname"]."<br />";
$message .= " <strong>Email Address: </strong>".$_POST["app_email_address"]."<br />";
$message .= " <strong>Phone No: </strong>".$_POST["app_phone"]."<br />";
$message .= " <strong>Appointment Date: </strong>".$_POST["datepicker"]."<br />";
$message .= " <strong>Gender: </strong>".$_POST["gender"]."<br />";
$message .= " <strong>Message: </strong>".$_POST["app_msg"]."<br />";
$subject = 'Book Appointment';
$headers = "From: ".$_POST["app_email_address"]."\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$send = mail($to,$subject,$message,$headers);
if($send)
{
echo "success";
}
else
{
echo "error";
}
}
?>