-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
74 lines (58 loc) · 2.19 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
<?php include "includes/db.php"?>
<?php include "includes/header.php"?>
<!-- Navigation -->
<?php include "includes/navigation.php"?>
<?php
if(isset($_POST['contact'])) {
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$query = "INSERT INTO message(name, email, message, msg_date) VALUES ('$name', '$email', '$message', now())";
$contact_query = mysqli_query($connection,$query);
if(!$contact_query){
die("Query Failed". mysqli_error($connection));
}
}
?>
<section id="contact-form" class="py-3">
<div class="container">
<h1 class="l-heading"><span class="text-primary">Contact</span> Us</h1>
<p>Please fill out the form below to contact us</p>
<form action="" method="post" role="form">
<div class="form-group">
<label for="name">Name</label>
<input type="text" name="name" id="name">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" name="email" id="email">
</div>
<div class="form-group">
<label for="message">Message</label>
<textarea name="message" id="message"></textarea>
</div>
<button type="submit" name="contact" class="but">Submit</button>
</form>
</div>
</section>
<section id="contact-info" class="bg-dark">
<div class="container" style="padding: 32px;">
<div class="col-lg-4" style="text-align: center;">
<i class="fa fa-home fa-5x"></i>
<h3>Location</h3>
<p>South Khulshi, Chattagram</p>
</div>
<div class="col-lg-4" style="text-align: center;">
<i class="fa fa-phone fa-5x"></i>
<h3>Phone Number</h3>
<p>(555) 555-5555</p>
</div>
<div class="col-lg-4" style="text-align: center;">
<i class="fa fa-envelope fa-5x"></i>
<h3>Email Address</h3>
<p>[email protected]</p>
</div>
</div>
</section>
<!-- Footer -->
<?php include "includes/footer.php"?>