-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.php
More file actions
138 lines (124 loc) · 8.86 KB
/
Copy pathcontact.php
File metadata and controls
138 lines (124 loc) · 8.86 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?php
require('./admin/db_config.php');
require('./admin/essentials.php')
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact us</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
<link rel="stylesheet" href="./contact.php">
</head>
<body>
<?php
require('./components/header.php');
?>
<main style="padding: 13rem 0;">
<section class="contact pt-md-5 px-4">
<div class="contact-content" style="max-width: 1000px; margin: 0 auto; width: 100%; padding: 5rem 0">
<h3 class="py-4 py-lg-5 text-center">Contact us</h3>
<div class="row">
<div class="col">
<div class="row">
<div class="col-lg-6">
<form method="POST">
<div class="d-flex flex-column gap-4">
<div class="col">
<input type="text" name="first_name" class="form-control" placeholder="First name">
</div>
<div class="col">
<input type="text" name="last_name" class="form-control" placeholder="Last name">
</div>
<div class="col">
<input type="email" name="email" class="form-control" placeholder="email">
</div>
<div class="col">
<input type="number" name="phone_number" class="form-control" placeholder="Phone number">
</div>
<div class="col form-floating">
<textarea class="form-control" name="message" placeholder="Leave a comment here" id="floatingTextarea" style="height: 200px"></textarea>
<label for="floatingTextarea">Message</label>
</div>
<button name="send" type="submit" class="btn" style="background-color:#E38B29; color:#fff">submit</button>
</div>
</form>
</div>
<div class="col-lg-6">
<div class="row">
<div class="col-12 mb-4">
<div class="">
<table>
<tbody style="line-height: 3rem;">
<tr>
<td class="pe-4">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-geo-alt" viewBox="0 0 16 16">
<path d="M12.166 8.94c-.524 1.062-1.234 2.12-1.96 3.07A31.493 31.493 0 0 1 8 14.58a31.481 31.481 0 0 1-2.206-2.57c-.726-.95-1.436-2.008-1.96-3.07C3.304 7.867 3 6.862 3 6a5 5 0 0 1 10 0c0 .862-.305 1.867-.834 2.94zM8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10z" />
<path d="M8 8a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />
</svg>
<span>Address</span>
</td>
<td>
labangan
</td>
</tr>
<tr>
<td>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-telephone" viewBox="0 0 16 16">
<path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.568 17.568 0 0 0 4.168 6.608 17.569 17.569 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.678.678 0 0 0-.58-.122l-2.19.547a1.745 1.745 0 0 1-1.657-.459L5.482 8.062a1.745 1.745 0 0 1-.46-1.657l.548-2.19a.678.678 0 0 0-.122-.58L3.654 1.328zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z" />
</svg>
<span>Phone</span>
</td>
<td>
09509810158
</td>
</tr>
<tr>
<td>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope" viewBox="0 0 16 16">
<path d="M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4Zm2-1a1 1 0 0 0-1 1v.217l7 4.2 7-4.2V4a1 1 0 0 0-1-1H2Zm13 2.383-4.708 2.825L15 11.105V5.383Zm-.034 6.876-5.64-3.471L8 9.583l-1.326-.795-5.64 3.47A1 1 0 0 0 2 13h12a1 1 0 0 0 .966-.741ZM1 11.105l4.708-2.897L1 5.383v5.722Z" />
</svg>
<span>Email</span>
</td>
<td>
<span>test@gmail.com</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-12">
<div class="map">
<iframe style="width:100%" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3950.3620381893234!2d122.50535239999999!3d8.0645048!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3253c98221b67083%3A0xb2ef693fa07a146e!2sBAYANGAN%20HOTEL%20AND%20BEACH%20RESORT!5e0!3m2!1sen!2sae!4v1683559283368!5m2!1sen!2sae" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<?php
if (isset($_POST['send'])) {
$form_data = filteration($_POST);
$query = "INSERT INTO `user_queries`(`first_name`, `last_name`, `email`, `phone_number`, `message`) VALUES (?,?,?,?,?)";
$values = [$form_data['first_name'], $form_data['last_name'], $form_data['email'], $form_data['phone_number'], $form_data['message']];
$res = insert($query, $values, 'sssss',);
if ($res == 1) {
alert('success', 'Mail sent!');
} else {
alert('error', 'try again later.');
}
}
?>
<?php
require('./footer.php')
?>
</body>
</html>