-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.php
52 lines (47 loc) · 919 Bytes
/
view.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>View</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
min-height: 100vh;
}
video {
width: 640px;
height: 360px;
}
a {
text-decoration: none;
color: #006CFF;
font-size: 1.5rem;
}
</style>
</head>
<body>
<a href="index.php">UPLOAD</a>
<div class="alb">
<?php
include "db_conn.php";
$sql = "SELECT * FROM videos ORDER BY id DESC";
$res = mysqli_query($conn, $sql);
if (mysqli_num_rows($res) > 0) {
while ($video = mysqli_fetch_assoc($res)) {
?>
<video src="uploads/<?=$video['video_url']?>"
controls>
</video>
<?php
}
}else {
echo "<h1>Empty</h1>";
}
?>
</div>
</body>
</html>