-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloadvideopostsothers.php
More file actions
40 lines (26 loc) · 1.09 KB
/
Copy pathloadvideopostsothers.php
File metadata and controls
40 lines (26 loc) · 1.09 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
<?php
include('db.php');
$postNewCount = $_POST['postNewCount'];
$sql="SELECT * FROM videos WHERE category='Others' ORDER BY ID DESC LIMIT $postNewCount";
$result= mysqli_query($con,$sql);
$queryResults= mysqli_num_rows($result);
if($queryResults >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 record yet.')</script>";
}
?>