-
Notifications
You must be signed in to change notification settings - Fork 0
/
final.php
34 lines (33 loc) · 996 Bytes
/
final.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 'database.php'; ?>
<?php session_start(); ?>
<?php $total = $mysqli->query("SELECT * FROM `questions`")->num_rows; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/style.css">
<title>PHP Quizzer</title>
</head>
<body>
<header>
<div class="container">
<h1>PHP Quizzer</h1>
</div>
</header>
<main>
<div class="container">
<h2>You're Done!</h2>
<p>Congrats! You have completed the test!</p>
<p>Final Score: <?php echo $_SESSION['score']; ?> out of <?php echo $total; ?></p>
<a href="question.php?n=1" class="start">Take Again</a>
</div>
</main>
<footer>
<div class="container">
Copyright © 2019, PHP Quizzer
</div>
</footer>
</body>
</html>