-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwatch_course.php
34 lines (31 loc) · 931 Bytes
/
watch_course.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
<?php
include("includes/header.php");
include("includes/db.php");
if(!isset($_SESSION["username"])){
header("Location: login.php");
}
?>
<div id="view-video">
<video controls width="1200px">
<source id="vid-src" src="videos/1video.mp4" id="video-url" />
</video>
<div class="videos-links">
<h2>Course Contents</h2>
<?php
$id = (int)($_GET["id"]);
$sqlquery = "SELECT video_title,video_url from videos where course_id=$id";
$video_url="";
$video_title="";
$result = mysqli_query($conn,$sqlquery);
while($row=mysqli_fetch_assoc($result)){
$video_title = $row["video_title"];
$video_url = $row["video_url"];
?>
<div class="video-link" onclick=updateLink('<?php echo $video_url; ?>')>
<i class="fa-solid fa-circle-play icon fa-lg"></i>
<h3><?php echo $video_title; ?></h3>
</div>
<?php }
echo "</div></div>";
include("includes/footer.php");
?>