-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
54 lines (48 loc) · 1.49 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
// Receiving variables
@$Name = addslashes($_POST['Name']);
@$Job_Title = addslashes($_POST['Job_Title']);
@$Company = addslashes($_POST['Company']);
@$Email = addslashes($_POST['Email']);
@$Phone = addslashes($_POST['Phone']);
@$Fax = addslashes($_POST['Fax']);
@$Message = addslashes($_POST['Message']);
// Validation
if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $Email))
{
header("Location: error.html");
exit;
}
//Sending Email to form owner
# Email to Owner
$pfw_header = "From: $Email";
$pfw_subject = "ASEAN BEAUTY 2015 ENQUIRY FORM";
// Change to your email address.........
$pfw_email_to = "[email protected]";
//......................................
$pfw_message = "***** CONTACT DETAILS *****\n"
. "Name : $Name\n"
. "Job Title : $Job_Title\n"
. "Company Name : $Company\n"
. "Email : $Email\n"
. "Phone No : $Phone\n"
. "Fax No : $Fax\n"
. "\n"
. "\n"
. "***** MESSAGE *****\n"
. "\n"
. "Message : $Message\n"
. "\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
//Sending auto respond Email to user
# Email to Owner
// Change to your email address.........
$pfw_header = "From: [email protected]";
//......................................
$pfw_subject = "ASEAN BEAUTY 2015 ENQUIRY FORM";
$pfw_email_to = "$Email";
$pfw_message = "Thank you. Your form has been successfully sent to us. Our sales person will be contact you as soon as possible.\n"
. "\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: thank_you.html");
?>