-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchengine3others.php
More file actions
144 lines (80 loc) · 3.86 KB
/
Copy pathsearchengine3others.php
File metadata and controls
144 lines (80 loc) · 3.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
139
140
141
142
143
144
<!DOCTYPE html>
<html>
<html>
<head>
<title>SecSite stories</title>
<script src="secsite.js"></script>
<!--bootstrap links-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="secsite.css">
</head>
<body>
<!--bootstrap links-->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js" integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js" integrity="sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj" crossorigin="anonymous"></script>
<div class="container">
<div id="samp">
<h1 id="mainhearder">SecSite</h1>
<form action="searchengine3others.php" method="POST" name="sec-search3">
<p id="searchinput">
<input class="form-control" type="text" placeholder="Search SecSite" id="searchme" name="search3">
<button class="btn btn-danger" type="submit" name="searchbtn3" id="btndanger">SecSearch</button>
</p>
</form>
</div>
<div class="sidenav">
<a href="secstories.php">SecStories</a>
<a href="secpictures.php">SecPics</a>
<a href="secvideos.php">SecVids</a>
<a href="secaudios.php">SecAudios</a>
</div>
<div class="sidenav2">
<a href="Loveandlife3.php">Love & Life</a>
<a href="Politics3.php">Politics</a>
<a href="Entertainment3.php">Entertainment</a>
<a href="Gamesandsports3.php">Games & sports</a>
<a href="Business3.php">Business</a>
<a href="Others3.php">Others</a>
</div>
<div id="secvideos" style="width: 1000px; margin-left: 50px;">
<div id="postsclass3">
<!--This is where the text posts appear-->
<?php
include('db.php');
if(isset($_POST['searchbtn3'])) {
if(!empty($_POST['search3'])){
$search = mysqli_real_escape_string($con, $_POST['search3']);
$sql = "SELECT * FROM videos WHERE category='others' and caption LIKE '%$search%'";
$result = mysqli_query($con, $sql);
$queryResult = mysqli_num_rows($result);
if($queryResult > 0) {
while($row = mysqli_fetch_assoc($result)) {
echo "
<div style='height:auto; margin-top:20%'>
<div style='height: auto; border-radius: 10px;text-align: left; margin-left:0%; padding:10px;'>".$row['caption']."</div>
<video style='width: 100%; height: auto; margin-top:-12%;' controls>
<source src='videos/".$row['name']."' type= 'video/mp4'>
</div>
<div style='height:40px; width:100%; display:flex; margin-top: -10%; background-color: rgb(63, 21, 50);'>
<button class='btn btn-primary' style='margin-left: 2%;'>comment</button>
<button class='btn btn-primary'style=' margin-left: 40%;' >share</button>
</div>
</div>
";
}
}else {
echo"<script>alert('No results matching your search.');</script>";
echo "<script>location.replace('Others3.php');</script>";
}
}else{
echo "<script>alert('Type something to search')</script>";
echo "<script>location.replace('Others3.php');</script>";
}
}
?>
</div>
</div>
</div>
</body>
</html>