-
Notifications
You must be signed in to change notification settings - Fork 27
/
search.php
257 lines (204 loc) · 9.9 KB
/
search.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
<?php
session_start();
include('./db/db_config.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Browse Developers</title>
<link href="https://fonts.googleapis.com/css?family=Pacifico&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,400i,700,900&display=swap"
rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="search.css" />
</head>
<body>
<div class="search-page">
<nav class="search-nav">
<div>
<h3><a class="link increasefont" href="index.html">RemDev</a></h3>
</div>
<div class="search-right">
<ul class="search-ul">
<li class="search-li">
<a href="search.html">Browse developers</a>
</li>
<li class="search-li"><a href="#">About Us</a></li>
<li class="search-li"><a href="#">Login</a></li>
<li class="search-li signup">
<a href="signup.html">Sign Up</a>
</li>
</ul>
</div>
</nav>
<hr class="hr" />
<section class="search-section">
<div class="search-header">
<div>
<p class="search-header_primary">Browse Developers</p>
</div>
<?php
if(array_key_exists('search', $_GET)){
$search = $_GET['search'];
// '%' enables your search return anything that looks like tha value that was entered. Eg HTML returns html, HTML, htmL.
$skills = mysqli_query($db, "SELECT * FROM skills WHERE skill_Name LIKE '%".$search."'")or die(mysqli_error($db));
if( mysqli_num_rows($skills) > 0){
while($show = mysqli_fetch_array($skills))
{
echo "yasss";
break;
}
// End while loop...
} else{
echo "Search returned no results";
}
}
?>
<div class="search-header_secondary">
<form action="" method="get">
<input class="header-inp" type="text" name="search" placeholder="What skills are you looking for?">
<input type="submit" name="search" value="Find Developers"</>
</div>
</form>
</div>
</section>
</div>
<section class="developers-section">
<div class="developers">
<div class="developers-filter">
<div class="filter-left">
<div class="filter-1">
<p class="filter-1_header">Filter by:</p>
<select name="country" id="">
<option value="Nigeria">Nigeria</option>
<option value="canada">canada</option>
</select>
</div>
<div class="filter-1">
<select class="input-icon" name="country" id="">
<option value="$15/hr">$15/hr</option>
<option value="$20/hr">$20/hr</option>
</select>
</div>
<div class="filter-1">
<select name="country" id="">
<option value="Front-end...">Front-end...</option>
<option value="Back-end...">Back-end...</option>
</select>
</div>
</div>
<div class="filter-right">
<div class="filter-2">
<p class="filter-2_header">Sort by:</p>
<select class="input-icon" name="rating" id="">
<option value="Top rated">Top rated</option>
<option value="Completed Projects">Completed Projects</option>
</select>
</div>
</div>
</div>
<?php
$devs = mysqli_query($db, "SELECT * FROM developer LIMIT 4")or die(mysqli_error($db)); ?>
<?php while ($row = mysqli_fetch_array($devs)) { ?>
<div class="developer-details">
<div class="developer-img">
<img src="<?php echo $row[12];?>" alt="developer picture" class="developer-img_main">
</div>
<div class="developer-detail">
<p class="developer-name"><?php echo $row[1].' '.$row[2];?></p>
<ul class="developer-list">
<li class="developer-list_frontend"><?php echo $row[13];?></li>
<li class="developer-list_item"><?php echo $row[9];?></li>
<li class="developer-list_item"><?php echo $row[8];?></li>
<li class="developer-list_item yellow-item"> <i class="fa fa-star" aria-hidden="true"></i> 5.0
<span class="number">(400)</span></li>
</ul>
<p class="developer-text"><?php echo $row[6];?></p>
<div class="developer-skills">
<ul class="developer-skills_list">
<li class="developer-skills_item">HTML</li>
<li class="developer-skills_item">CSS</li>
<li class="developer-skills_item">Javascript</li>
<li class="developer-skills_item">PHP</li>
<li class="developer-skills_item">Python</li>
<li class="developer-skills_item">Django</li>
<li class="developer-skills_item">React</li>
<li class="developer-skills_item">Vue JS</li>
<li class="developer-skills_item">Node JS</li>
<li class="developer-skills_item">Lorem Ipsum</li>
<li class="developer-skills_item">+10 more</li>
</ul>
</div>
</div>
<div class="view-profile">
<a href="profile.php?<?php echo $row[0];?>" > View profile</a>
</div>
</div><hr> <?php } ?> </div>
<div class="developers-signup">
<p class="signup-header">Want to browse more developers?</p>
<input type="submit" name="signup" value="Signup">
</div>
</div>
<div class="company-logos">
<svg class="company-logo">
<use xlink:href='./asset/sprite.svg#slack'></use>
</svg>
<svg class="company-logo">
<use xlink:href='./asset/sprite.svg#facebook'></use>
</svg>
<svg class="company-logo">
<use xlink:href='./asset/sprite.svg#tesla'></use>
</svg>
<svg class="company-logo">
<use xlink:href='./asset/sprite.svg#twitter'></use>
</svg>
<svg class="company-logo">
<use xlink:href='./asset/sprite.svg#search'></use>
</svg>
<svg class="company-logo">
<use xlink:href='./asset/sprite.svg#netflix'></use>
</svg>
</div>
</section>
<section class="bottom-section">
<div class="footer">
<div class="footer-1">
<div class="footer-1_primary">
<p class="footer-1_header">What are you waiting for?</p>
<p class="footer-1_text">Lets help you bring your dream to life</p>
</div>
<div class="footer-search">
<div>
<input class="footer_inp" type="text" placeholder="What skills are you looking for?">
</div>
<div class="footer-1_btns">
<button class="footer-1_register">Register as developer</button>
<p class="footer-1_or">or</p>
<button class="footer-1_find">Find developers</button>
</div>
</div>
</div>
<div class="footer-2">
<div class="footer-2_left">
<p>© 2019 <span class="footer-2_remdev">RemDev</span></p>
</div>
<div class="footer-2_right">
<svg class="footer-2_icons">
<use xlink:href='./asset/sprite.svg#facebook-1'></use>
</svg>
<svg class="footer-2_icons">
<use xlink:href='./asset/sprite.svg#twitter-1'></use>
</svg>
<svg class="footer-2_icons">
<use xlink:href='./asset/sprite.svg#github'></use>
</svg>
</div>
</div>
</div>
</section>
</body>
</html>