-
Notifications
You must be signed in to change notification settings - Fork 0
/
schedule.php
292 lines (266 loc) · 9.52 KB
/
schedule.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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<!DOCTYPE html>
<html>
<head>
<!-- Basic -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Site Metas -->
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>SkyTech Automotive</title>
<!-- slider stylesheet -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" />
<!-- bootstrap core css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<!-- font awesome style -->
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" />
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet" />
<!-- responsive style -->
<link href="css/responsive.css" rel="stylesheet" />
<style>
.ok-message {
color: greenyellow;
}
</style>
</head>
<body>
<div class="hero_area">
<!-- header section strats -->
<header class="header_section">
<div class="header_top">
<div class="container-fluid">
<div class="contact_nav">
<a href="">
<i class="fa fa-phone" aria-hidden="true"></i>
<span>
Call : +968 91111111
</span>
</a>
<a href="">
<i class="fa fa-envelope" aria-hidden="true"></i>
<span>
Email : [email protected]
</span>
</a>
</div>
</div>
</div>
<div class="header_bottom">
<div class="container-fluid">
<nav class="navbar navbar-expand-lg custom_nav-container ">
<a class="navbar-brand" href="index.html">
<span>
<img src="./images/logo.png" style="height: 50px;" alt="">
</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class=""> </span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ">
<li class="nav-item ">
<a class="nav-link" href="index.html">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="schedule.php">schedule an appointment</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.html"> About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="funpage.html">funpage</a>
</li>
<li class="nav-item">
<a class="nav-link" href="service.html">Services</a>
</li>
<li class="nav-item">
<a class="nav-link" href="Questionnairepage.php">Questionnaire page</a>
</li>
<li class="nav-item">
<a class="nav-link" href="bestworker.php">best worker</a>
</li>
<li class="nav-item">
<a class="nav-link" href="billCalculator.html">Bill Calculator</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact Us</a>
</li>
</ul>
</div>
</nav>
</div>
</div>
</header>
<!-- end header section -->
</div>
<!-- contact section -->
<?php
// insert to db table.
$ok = false;// for send message
if (isset($_POST["name"])) {
$name = $_POST["name"];
$email = $_POST["email"];
$phone = $_POST['phone'];
$car_brand = $_POST['car_brand'];
$car_name = $_POST['car_name'];
$car_model = $_POST['car_model'];
$message = $_POST['message'];
$server_name = "ulsq0qqx999wqz84.chr7pe7iynqr.eu-west-1.rds.amazonaws.com"; $username = "xe2ge1qqbdrgxdx6";
$password = "inio92922tfakvh4"; $dbname = "seklrqnnhsqij64j";
$conn = mysqli_connect($server_name, $username, $password, $dbname);
if (!$conn) {
die("Connection failed: ".
mysqli_connect_error());
}
$sql = "INSERT INTO `appointments`
(`name`, `phone`, `email`, `car_brand`, `car_name`, `car_model`, `message`)
VALUES
('{$name}', '{$phone}', '{$email}', '{$car_brand}', '{$car_name}', {$car_model}, '{$message}')";
$result = mysqli_query($conn, $sql);
$ok = true;
}
?>
<section class="contact_section layout_padding">
<div class="container">
<div class="heading_container">
<h2 style="text-align: center;">
schedule an appointment
</h2>
</div>
<div class="">
<div class="">
<form method="post" action="<?php echo $_SERVER["PHP_SELF"] ?>">
<div>
<input style="color: black;" type="text" placeholder="Name" name="name" required/>
</div>
<div>
<input style="color: black;" type="text" placeholder="Phone Number" name="phone" required/>
</div>
<div>
<input style="color: black;" type="email" placeholder="Email" name="email" required/>
</div>
<div>
<input style="color: black;" type="text" placeholder="Car brand" name="car_brand" required/>
</div>
<div>
<input style="color: black;" type="text" placeholder="Car name" name="car_name" required/>
</div>
<div>
<input style="color: black;" type="text" placeholder="Car model" name="car_model" required/>
</div>
<div>
<input style="color: black;" type="text" class="message-box" placeholder="what the services you want" name="message" required/>
</div>
<div class="d-flex ">
<button type="submit">
SEND
</button>
</div>
<div class="ok-message">
<?php
if ($ok) {
echo "Appointment has been scheduled!";
}
?>
</div>
</form>
</div>
</div>
</div>
</section>
<!-- end contact section -->
<!-- info section -->
<section class="info_section ">
<div class="container">
<h4>
Get In Touch
</h4>
<div class="row">
<div class="col-lg-10 mx-auto">
<div class="info_items">
<div class="row">
<div class="col-md-4">
<a href="">
<div class="item ">
<div class="img-box ">
<i class="fa fa-map-marker" aria-hidden="true"></i>
</div>
<p>
6Th alkhod, Al seeb, Muscat
</p>
</div>
</a>
</div>
<div class="col-md-4">
<a href="">
<div class="item ">
<div class="img-box ">
<i class="fa fa-phone" aria-hidden="true"></i>
</div>
<p>
+968 91111111
</p>
</div>
</a>
</div>
<div class="col-md-4">
<a href="">
<div class="item ">
<div class="img-box">
<i class="fa fa-envelope" aria-hidden="true"></i>
</div>
<p>
</p>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="social-box">
<h4>
Follow Us
</h4>
<div class="box">
<a href="">
<i class="fa fa-facebook" aria-hidden="true"></i>
</a>
<a href="">
<i class="fa fa-twitter" aria-hidden="true"></i>
</a>
<a href="">
<i class="fa fa-youtube" aria-hidden="true"></i>
</a>
<a href="">
<i class="fa fa-instagram" aria-hidden="true"></i>
</a>
</div>
</div>
</section>
<!-- end info_section -->
<!-- footer section -->
<footer class="footer_section">
<div class="container">
<p>
© <span id="displayDateYear"></span> SkyTech 2023 C
</p>
</div>
</footer>
<!-- footer section -->
<script src="js/jquery-3.4.1.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js">
</script>
<script src="js/custom.js"></script>
<!-- Google Map -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCh39n5U-4IoWpsVGUHWdqB6puEkhRLdmI&callback=myMap"></script>
<!-- End Google Map -->
</body>
</html>