TheMathWizard/controllers/game.php

13 lines
366 B
PHP

<?php
$heading = "Game";
$username = 'MatheApp';
$password = 'password';
$config = require('config.php');
$db = new Database($config['database'], $username, $password);
session_start();
if(!isset($_SESSION["username"])){
header("Location: /");
exit;
}
$stats = $db->getPlayerStats($_SESSION['username']);
require "views/game.view.php";