implemented class method for login, register, update, delete and implemented readDatabase functionality to game.js. Write funtionality is in preogress

This commit is contained in:
Patryk Hegenberg 2023-01-10 22:51:40 +01:00
parent fbb52f76c0
commit 03e5591e0a
13 changed files with 145 additions and 83 deletions

View file

@ -1,3 +1,13 @@
<?php
$heading = "Game";
require "views/game.view.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";