-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
86 lines (81 loc) · 3.25 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
include 'includes/navigation_bar.php';
include('smtp/PHPMailerAutoload.php');
$name ='';
$email ='';
$subject ='';
$meassage ='';
if(isset($_POST['submit'])){
$name = get_safe_value($_POST['name']);
$email = get_safe_value($_POST['email']);
$subject = get_safe_value($_POST['subject']);
$meassage = get_safe_value($_POST['message']);
mysqli_query($con,"INSERT INTO contact_us(name,email,subject,meassage) VALUES('$name','$email','$subject','$meassage')");
$html="<p><b>Thank You $name </b> ! <br> for connecting with us, Will get back to you shortly.</p>";
send_email($email,$html,'Contact~E-marketplace');
echo "<script>
alert(`Thank You $name for connecting with us, Will get back to you shortly !`);
</script>";
redirect('index');
}
?>
<!-- Contact Page -->
<div class="container contact">
<div class="row heading">
<div class="col-xl-12">
<h2>Get in Touch</h2>
<p>CONTACT INFORMATION</p>
</div>
</div>
<div class="row form-body">
<div class="col-xl-6">
<div class="contact-body">
<div class="contact-icon">
<i class="fa fa-map-marker" aria-hidden="true"></i>
</div>
<div class="contact-info">
<p>155 Main Street, 17B, Brooklyn, NY</p>
</div>
</div>
<div class="contact-body">
<div class="contact-icon">
<i class="fa fa-phone" aria-hidden="true"></i>
</div>
<div class="contact-info">
<p>800-123-4567</p>
</div>
</div>
<div class="contact-body">
<div class="contact-icon">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
</div>
<div class="contact-info">
<p>[email protected]</p>
</div>
</div>
</div>
<div class="col-xl-6">
<form method="post" action="">
<div class="form-input">
<input type="text" name="name" placeholder="Enter Your Name" required>
</div>
<div class="form-input">
<input type="email" name="email" placeholder="Enter Your Email" required>
</div>
<div class="form-input">
<input type="text" name="subject" placeholder="Enter Your Subject" required>
</div>
<div class="form-input">
<textarea name="message" id="" cols="30" rows="10" placeholder="Enter your message"></textarea>
</div>
<div class="form-input">
<button type="submit" name="submit">Send Message</button>
</div>
</form>
</div>
</div>
</div>
<!--X- Contact Page -X-->
<?php
include 'includes/footer.php';
?>