-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmit.php
More file actions
33 lines (25 loc) · 1012 Bytes
/
Copy pathsubmit.php
File metadata and controls
33 lines (25 loc) · 1012 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
<?php
$fname = $_REQUEST[ 'fname' ];
$lname = $_REQUEST[ 'lname' ];
$date = $_REQUEST[ 'date' ];
$time = $_REQUEST[ 'time' ];
$instructions = $_REQUEST[ 'instructions' ];
$email = $_REQUEST[ 'email' ];
$magic = $_REQUEST[ 'magic' ]; //honey pot variable. do not change
//exit form if honeypot variable is filled
if ($magic != "") {
exit;
}
$subject = "Reservations from ".fname. " for ". $date. " at ". $time ;
$message = "Name :".$fname."".lname."</n>";
$message .= "Date:".$date."</n>";
$message .= "Time:".$time."</n>";
$message .= "Instructions:".$instructions."</n>";
$message = "Name: ".$fname." || Email: ".$email." || Subject: ".$subject." || Message: ".$message;
/* Replace YOUR_MAIL With Your Mail Address inside '' */
if ( mail( 'YOUR_MAIL', $mail_subject, $message, "From:" . $email ) ) {
echo "Thank you <strong>$name</strong> for contacting with us. We will get back to you soon !!!";
} else {
echo "Error in sending message !!! Please try again";
}
?>