Hi guys,
Hope you're all well. I have managed to get the quiz that I have been working on to work now thank god!
I just want to show just 20 random questions from the 80 questions that I have in the question bank.
Looking at the quiz files I think this is where I need to make the changes
PHP Code:
<?php
$msg = "";
if(isset($_GET['msg'])){
$msg = $_GET['msg'];
$msg = strip_tags($msg);
$msg = addslashes($msg);
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Quiz Tut</title>
<script>
function startQuiz(url){
window.location = url;
}
</script>
</head>
<body>
<?php echo $msg; ?>
<h3>Click below when you are ready to start the quiz. This is a ramdom quiz so each time you take the quiz the questions will show in a different order each time!</h3>
<button onClick="startQuiz('quiz.php?question=1')">Click Here To Begin</button>
</body>
</html>
I want to show 20 questions at random. I think this is the line of code that I need to do something with.
<button onClick="startQuiz('quiz.php?question=1')">Click Here To Begin</button>
Any help would be much appreciated