-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontacts.php
More file actions
30 lines (24 loc) · 1.07 KB
/
contacts.php
File metadata and controls
30 lines (24 loc) · 1.07 KB
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
<?php
/*echo "<pre>";
print_r($_POST);
echo "</pre>";*/
$email = "[email protected]";
$name = $_POST["name"];
$body = "<div style=\"max-width:600px;padding:10px\">
<div style=\"width: 580px; margin: auto; padding: 15px;\">
<p style=\"font-size: 16px; font-family: calibri;\">Hi,</p>
<p style=\"font-size: 16px; font-family: calibri;\">This is".$_POST["name"]." my number is ".$_POST["phone"]." email ".$_POST["email"]." my message ".$_POST["message"].".</p>
<p style=\"font-size: 16px; font-family: calibri;\">Thank you very much for your time. looking forward to hear from you.</p>
</div>
</div>";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-Mailer: PHP". phpversion() ."\r\n";
$subject="$name leaves a message";
$to= "$email";
$body="$body";
$headers="$headers";
mail($to,$subject,$body,$headers);
header("location: contact.html");
?>