-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
27 lines (23 loc) · 888 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
<?php
// Send offer request email
if(isset($_POST['offer-submit'])){
$receiver = "moikka@erikv.fi";
$from = $_POST['offer-email'];
$firstname = $_POST['offer-firstname'];
$lastname = $_POST['offer-lastname'];
$phone = $_POST['offer-phone'];
$subject = "Offer request";
$message = "Offer request from: " . $firstname . " " . $lastname . "\n" . $from . ", " . $phone . "\n\n" . "Message:" . "\n" . $_POST['offer-desc'];
mail($receiver, $subject, $message);
}
// Send contact form email
if(isset($_POST['contact-submit'])){
$receiver = "moikka@erikv.fi";
$from = $_POST['email'];
$name = $_POST['name'];
$phone = $_POST['phone'];
$subject = "Contact form submission";
$message = "Contact from: " . $name . "\n" . $from . ", " . $phone . "\n\n" . "Message:" . "\n" . $_POST['message'];
mail($receiver, $subject, $message);
}
?>