-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontact.php
32 lines (26 loc) · 819 Bytes
/
contact.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
<?php
if($_POST['send']){
sendMail("Message from ");
}
elseif($_POST['sponsor'])
{
sendMail("Become a sponsor from ");
}
function sendMail($buttonMessage) {
$to = "[email protected]";
$subject = $buttonMessage . $_POST['namecontact'] . " via the website";
$message = "Name : " . $_POST['namecontact']
. "\n\nE-mail : " . $_POST['emailcontact']
. "\n\nMessage : " . $_POST['message'];
$headers = "From: \"Automail\" <[email protected]>" . "\r\n";
if(mail($to, $subject, $message, $headers))
{
echo("Thank you for contacting us.");
echo("</br>You will be redirected in a few seconds.");
echo "<script>setTimeout(\"location.href='http://www.aubgmusicals.com'; \", 4500);</script>";
}else
{
echo("There is a problem with the server. Please try again later or use regular mail.");
}
}
?>