-
Notifications
You must be signed in to change notification settings - Fork 71
/
signup.php
188 lines (166 loc) · 5.93 KB
/
signup.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Sonko Car Rental</title>
<meta charset="utf-8">
<meta name="author" content="pixelhint.com">
<meta name="description" content="La casa free real state fully responsive html5/css3 home page website template"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/responsive.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body>
<section class="">
<?php
include 'header.php';
?>
<section class="caption">
<h2 class="caption" style="text-align: center">Find You Dream Cars For Hire</h2>
<h3 class="properties" style="text-align: center">Range Rovers - Mercedes Benz - Landcruisers</h3>
</section>
</section><!-- end hero section -->
<section class="search">
<div class="wrapper">
<form action="#" method="post">
<input type="text" id="search" name="search" placeholder="What are you looking for?" autocomplete="off"/>
<input type="submit" id="submit_search" name="submit_search"/>
</form>
<a href="#" class="advanced_search_icon" id="advanced_search_btn"></a>
</div>
<div class="advanced_search">
<div class="wrapper">
<span class="arrow"></span>
<form action="#" method="post">
<div class="search_fields">
<input type="text" class="float" id="check_in_date" name="check_in_date" placeholder="Check In Date" autocomplete="off">
<hr class="field_sep float"/>
<input type="text" class="float" id="check_out_date" name="check_out_date" placeholder="Check Out Date" autocomplete="off">
</div>
<div class="search_fields">
<input type="text" class="float" id="min_price" name="min_price" placeholder="Min. Price" autocomplete="off">
<hr class="field_sep float"/>
<input type="text" class="float" id="max_price" name="max_price" placeholder="Max. price" autocomplete="off">
</div>
<input type="text" id="keywords" name="keywords" placeholder="Keywords" autocomplete="off">
<input type="submit" id="submit_search" name="submit_search"/>
</form>
</div>
</div><!-- end advanced search section -->
</section><!-- end search section -->
<section class="listings">
<div class="wrapper">
<h3>Signup Here</h3>
<form method="post">
<table>
<tr>
<td>Full Name:</td>
<td><input type="text" name="fname" required></td>
</tr>
<tr>
<td>Phone Number:</td>
<td><input type="text" name="phone" required></td>
</tr>
<tr>
<td>Email Address:</td>
<td><input type="email" name="email" required></td>
</tr>
<tr>
<td>ID Number:</td>
<td><input type="text" name="id_no" required></td>
</tr>
<tr>
<td>Gender:</td>
<td>
<select name="gender">
<option> Select Gender </option>
<option> Male </option>
<option> Female </option>
</select>
</td>
</tr>
<tr>
<td>Location:</td>
<td><input type="text" name="location" required></td>
</tr>
<tr>
<td colspan="2" style="text-align:right"><input type="submit" name="save" value="Submit Details"></td>
</tr>
</table>
</form>
<?php
if(isset($_POST['save'])){
include 'includes/config.php';
$fname = $_POST['fname'];
$id_no = $_POST['id_no'];
$gender = $_POST['gender'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$location = $_POST['location'];
$qry = "INSERT INTO client (fname,id_no,gender,email,phone,location,status)
VALUES('$fname','$id_no','$gender','$email','$phone','$location','Available')";
$result = $conn->query($qry);
if($result == TRUE){
echo "<script type = \"text/javascript\">
alert(\"Successfully Registered.\");
window.location = (\"account.php\")
</script>";
} else{
echo "<script type = \"text/javascript\">
alert(\"Registration Failed. Try Again\");
window.location = (\"signup.php\")
</script>";
}
}
?>
</ul>
</div>
</section> <!-- end listing section -->
<footer>
<div class="wrapper footer">
<ul>
<li class="links">
<ul>
<li>OUR COMPANY</li>
<li><a href="#">About Us</a></li>
<li><a href="#">Terms</a></li>
<li><a href="#">Policy</a></li>
<li><a href="#">Contact</a></li>
</ul>
</li>
<li class="links">
<ul>
<li>OTHERS</li>
<li><a href="#">...</a></li>
<li><a href="#">...</a></li>
<li><a href="#">...</a></li>
<li><a href="#">...</a></li>
</ul>
</li>
<li class="links">
<ul>
<li>OUR CAR TYPES</li>
<li><a href="#">Mercedes</a></li>
<li><a href="#">Range Rover</a></li>
<li><a href="#">Landcruisers</a></li>
<li><a href="#">Others.</a></li>
</ul>
</li>
<li class="about">
<p>Sonko Rescue team is an organized company that rents cars and other vehicles to clients at lower costs. We we are here to serve every Kenyan Citizen</p>
<ul>
<li><a href="http://facebook.com/sonko" class="facebook" target="_blank"></a></li>
<li><a href="http://twitter.com/sonko" class="twitter" target="_blank"></a></li>
<li><a href="http://plus.google.com/+sonko" class="google" target="_blank"></a></li>
<li><a href="#" class="skype"></a></li>
</ul>
</li>
</ul>
</div>
<div class="copyrights wrapper">
Copyright © <?php echo date("Y")?> All Rights Reserved | Designed by Consi.
</div>
</footer><!-- end footer -->
</body>
</html>