-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloadaudiopostsbusiness.php
More file actions
35 lines (25 loc) · 1.08 KB
/
Copy pathloadaudiopostsbusiness.php
File metadata and controls
35 lines (25 loc) · 1.08 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
<?php
include('db.php');
$postNewCount = $_POST['postNewCount'];
$sql="SELECT * FROM audios WHERE category='business' 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%;width:90%;margin-left:5%;'>
<div style='height: auto;width: 100%; border-radius: 10px;text-align: left; margin-left:0%; padding:10px; '>".$row['caption']."</div>
<video style='width: 100%; height: 50px; margin-top:-12%;' controls>
<source src='audios/".$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>
";
}
}
else {
echo "<script>alert('No record yet.')</script>";
}
?>