-
Notifications
You must be signed in to change notification settings - Fork 0
/
submit-form.php
35 lines (29 loc) · 922 Bytes
/
submit-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
<<<<<<< HEAD
if (isset($_POST['submit'])){
$to = "[email protected]"; // recipient's email address
$subject = "New message from Contact Form";
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name\nEmail: $email\n\n$message";
// Send email
mail($to, $subject, $body);
// Redirect to thank-you page
header('Location: thank-you.html');
exit();
}
=======
if (isset($_POST['submit'])){
$to = "[email protected]"; // recipient's email address
$subject = "New message from Contact Form";
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name\nEmail: $email\n\n$message";
// Send email
mail($to, $subject, $body);
// Redirect to thank-you page
header('Location: thank-you.html');
exit();
}
>>>>>>> master