PHP Classes

PHP Quiz Application: Show quizzes using questions read from an INI file

Recommend this page to a friend!
  Info   View files Example   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-12-19 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 70 All time: 10,268 This week: 84Up
Version License PHP version Categories
quizgenerator 1.0Freeware5PHP 5, Content management, Applications


This class can show quizzes using questions read from an INI file.

It can scan a directory with INI files that define the questions of the quiz.

It provides a page showing the available quizzes and links to the respective pages.

The class can show the question and possible answers in each quiz page as links to the quiz question result page.

It can also display a page showing if the user picked the right answer to a quiz.

Picture of Martijn Waeyenbergh
  Performance   Level  
Name: Martijn Waeyenbergh <contact>
Classes: 7 packages by
Country: Belgium Belgium
Age: 44
All time rank: 311617 in Belgium Belgium
Week rank: 298 Up3 in Belgium Belgium Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x


$quiz = new quiz();

$_GET['quiz']) && !empty($_GET['quiz'])){

$_SESSION['round'] = 1;

$_SESSION['quiz'] = $_GET['quiz'];

$_SESSION['score'] = 0;

/*echo "<pre>";
    echo "</pre>";
    $quiz = parse_ini_file("./quizes/" . $_SESSION['quiz'], true);
    echo "<pre>";
    echo "</pre>";*/

<!DOCTYPE html>
    <title>Quiz : <?php echo $quiz->prettyName($_GET['quiz']) ?></title>
    <link rel="stylesheet" type="text/css" href="./css/style.css">
    <div class='wrapper'>
        <h1><?= $quiz->prettyName($_GET['quiz']) ?></h1>
        <?= $quiz->toonvraag(); ?>
<hr style='clear:both;'>
        <a href='index.php'>Back to Quiz Selector</a>

  Files folder image Files  
File Role Description
Files folder imagecss (1 file)
Files folder imagequizes (2 files)
Accessible without login Plain text file answer.php Example answer
Plain text file class.quiz.php Class quiz class
Accessible without login Plain text file index.php Example index
Accessible without login Plain text file start.php Example start

  Files folder image Files  /  css  
File Role Description
  Accessible without login Plain text file style.css Data stylesheet

  Files folder image Files  /  quizes  
File Role Description
  Accessible without login Plain text file General_knowledge.ini Data QuizExpamle1
  Accessible without login Plain text file Modern_history.ini Data QuizExpamle2

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:10,268
This week:84Up