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:


$msg = "";   
    $msg = $_GET['msg'];   
    $msg = strip_tags($msg);   
    $msg = addslashes($msg);   
<!doctype html>   
<html lang="en">   
<meta charset="utf-8">   
<title>Quiz Tut</title>   
function startQuiz(url){   
    window.location = url;   
<?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>   

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

Member Avatar

This looks a bit screwy. So the quiz depends on sending a question number to a php page. Why are you using javascript at all? If this is a workaround to use a button as a link, you're far better styling a link to look like a button.

Member Avatar

Ok if you.re using a third party script have you asked over on that site?

yes servral times and the person who created the code cannot be contacted. There are a number of people who are wanting to ask the person questions and they cannot get any responses