-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.php
More file actions
41 lines (33 loc) · 888 Bytes
/
contact.php
File metadata and controls
41 lines (33 loc) · 888 Bytes
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
<?php
if(isset($_POST['submitted'])) {
$name = $_POST['fullname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
//$type = $_POST['type'];
$newsletter = $_POST['newsletter'];
$email_text = "";
if ($name != "") {
$email_text.="\nFull Name: ".stripcslashes($name);
}
if ($email != "") {
$email_text.="\nEmail Address: ".stripcslashes($email);
}
if ($phone != "") {
$email_text.="\nPhone: ".stripcslashes($phone);
}
// if ($type != "") {
// $email_text.="\nProject Type: ".stripcslashes($type);
// }
if ($newsletter != "") {
$email_text.="\nSend Newsletter: Duh";
} else {
$email_text.="\nSend Newsletter: Nope";
}
$to = "hello@saforian.com";//"info@wagnerskis.com";
$subject = "Saforian Site Message";
$headers = "From: $name <$email>\n";
mail($to, $subject, $email_text, $headers);
} else {
header("Location: http://saforian.com");
}
?>