-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
41 lines (40 loc) · 1.27 KB
/
index.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
<?php include 'database.php'; ?>
<?php
// Get Total Questions
$query = "SELECT * FROM questions";
// Get results
$results = $mysqli->query($query) or die($mysqli->error.__LINE__);
$total = $results->num_rows;
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>PHP Quizzer</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
</head>
<body>
<header>
<div class="container">
<h1>PHP Quizzer</h1>
</div>
</header>
<main>
<div class="container">
<h2>Test your PHP Knowledge</h2>
<p>This is a multiple choice quiz to test your knowledge of PHP</p>
<ul>
<li><strong>Number of Questions: </strong><?php echo $total; ?></li>
<li><strong>Type: </strong>Multiple Choice</li>
<li><strong>Estimated Time: </strong><?php echo $total * 0.8;?> Mins</li>
</ul>
<a href="question.php?n=1" class="start">Start Quiz</a>
</div>
</main>
<footer>
<div class="container">
Copyright © 2015, PHP Quizzer
</div>
</footer>
</body>
</html>