Spaces:
Sleeping

pde / videos.php
Pezh's picture
Update videos.php
2b68270 verified
Raw History Blame Contribute Delete
2.26 kB
<!DOCTYPE html>
<html>
<head>
<title>Video Page</title>
</head>
<body>
<h2>Welcome to the Video Page</h2>
<video id="video1" controls>
<source src="video1.mp4" type="video/mp4">
</video>
<br><br>
<div id="question1" style="display: none;">
<strong>Question 1:</strong>
<form action="save_score.php" method="post">
<input type="radio" name="q1" value="option1"> Option 1
<input type="radio" name="q1" value="option2"> Option 2
<input type="submit" value="Submit">
</form>
</div>
<video id="video2" style="display: none;" controls>
<source src="video2.mp4" type="video/mp4">
</video>
<br><br>
<div id="question2" style="display: none;">
<strong>Question 2:</strong>
<form action="save_score.php" method="post">
<input type="radio" name="q2" value="option1"> Option 1
<input type="radio" name="q2" value="option2"> Option 2
<input type="submit" value="Submit">
</form>
</div>
<video id="video3" style="display: none;" controls>
<source src="video3.mp4" type="video/mp4">
</video>
<br><br>
<div id="question3" style="display: none;">
<strong>Question 3:</strong>
<form action="save_score.php" method="post">
<input type="radio" name="q3" value="option1"> Option 1
<input type="radio" name="q3" value="option2"> Option 2
<input type="submit" value="Submit">
</form>
</div>
<script>
var video1 = document.getElementById("video1");
var video2 = document.getElementById("video2");
var video3 = document.getElementById("video3");
video1.onended = function() {
document.getElementById("question1").style.display = "block";
video2.style.display = "block";
video2.play();
};
video2.onended = function() {
document.getElementById("question2").style.display = "block";
video3.style.display = "block";
video3.play();
};
video3.onended = function() {
document.getElementById("question3").style.display = "block";
};
</script>
</body>
</html>