-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
188 lines (105 loc) · 3.3 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
<!DOCTYPE html>
<html lang="">
<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> TECHFOOR </title>
<!-- add icon link -->
<!-- css -->
<link rel = "icon" href ="websites-assets/img/icon_logo.png" type = "image/x-icon">
<link rel="stylesheet" href="websites-assets/css/all.min.css">
<link rel="stylesheet" href="websites-assets/css/all.css">
<link rel="stylesheet" href="websites-assets/css/bootstrap.min.css">
<link rel="stylesheet" href="websites-assets/css/style.css">
<!--js-->
<script src="websites-assets/js/jquery-3.4.1.min.js"></script>
<script src="websites-assets/js/sweetalert2.all.min.js"></script>
<script src="websites-assets/js/custom.js"></script>
</head>
<body>
<style>
* {
margin: auto;
padding: 0px;
box-sizing: border-box;
}
body {
height: 100%;
background-image: linear-gradient(to bottom right, red, yellow);
}
.main {
max-width: 800px;
display: flex;
align-items: center;
justify-content: center;
width: 70vw;
margin-top: -195px;
margin-bottom: -196px;
height: 90vh;
}
.search{
max-width: 800px;
align-items: center;
justify-content: center;
width: 70vw;
height: 100%;
}
.s_input {
height: 50px;
border: none;
outline: none;
border-radius: 4px 0px 0px 4px;
width: 100%;
padding: 11px;
font-size: 13pt;
}
.s_input::placeholder {
color: black;
}
.b_button {
height: 50px;
border: none;
outline: none;
border-radius: 0px 4px 4px 0px;
width: 3rem;
color: black;
background-color: white;
}
</style>
<?php
require_once('functions/function.php');
if(!empty($_GET))
{
$search = $_GET['search'];
$select="SELECT * FROM search_engine_data WHERE seo_keyword1 LIKE '%".$search."%' OR seo_keyword2 LIKE '%".$search."%' OR seo_keyword3 LIKE '%".$search."%' OR seo_keyword4 LIKE '%".$search."%' OR seo_keyword5 LIKE '%".$search."%'";
$query=mysqli_query($con,$select);
if($query){
}else{
echo "no data";
}
}
?>
<form method="get" action="search.php">
<div class="main">
<input name="search" placeholder="Search .." class="s_input" required /><button type="submit" id="" class="b_button"><i class="fas fa-search"></i></button>
</div>
</form>
<?php
foreach($query as $data){
?>
<div class="search">
<?php $description = $data['description']; ?>
<?php $title = $data['title']; ?>
<a href="<?= $data['websites']; ?>"><h3 class="text-white"><?php echo mb_strimwidth($title, 0, 50, "....."); ?></h3></a>
<?php echo mb_strimwidth($description, 0, 300, "....."); ?>
</div>
<hr>
<?php
}
?>
<!-- js -->
<script src="websites-assets/js/bootstrap.min.js"></script>
<script src="websites-assets/js/bootstrap.bundle.min.js"></script>
</body>
</html>