Initial commit

This commit is contained in:
Mark Wane 2019-10-04 19:05:39 +01:00
commit 75bf708fb0
5 changed files with 43 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
config.php

7
README.md Normal file
View file

@ -0,0 +1,7 @@
# Basic PHP Quiz system
A simple system for multiple choice quizes.
# Installation
Import the included dump file, copy `config.dist.php` to `config.php` and update the connection details

6
config.dist.php Normal file
View file

@ -0,0 +1,6 @@
<?php
// Database connection details
define( 'DB_HOST', 'localhost' );
define( 'DB_USER', '' );
define( 'DB_PASS', '' );
define( 'DB_NAME', '' );

23
index.php Normal file
View file

@ -0,0 +1,23 @@
<?php
require_once 'init.php';
?>
<!doctype html>
<html lang=en_GB>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Basic PHP Quiz</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div class="container">
<header class="row">
<div class="col col-md-6 offset-md-3">
<h1>Basic PHP Quiz</h1>
</div>
</header>
<main class="row">
</main>
</div>
</body>
</html>

6
init.php Normal file
View file

@ -0,0 +1,6 @@
<?php
require_once 'config.php';
spl_autoload_register( function( $class_name ){
include strtolower( $class_name ) . '.class.php';
} );