changed config.php and added delete function for administrator

This commit is contained in:
Patryk Hegenberg 2023-01-24 21:14:11 +01:00
parent 99535db4ee
commit a121e53503
10 changed files with 21 additions and 20 deletions

View file

@ -1,8 +1,6 @@
<?php
$username = 'MatheApp';
$password = 'password';
$config = require('config.php');
$db = new Database($config['database'], $username, $password);
$db = new Database($config['database'], $config['username'], $config['password']);
$data = json_decode(file_get_contents("php://input"), true);
$db->query("UPDATE user SET level= :level, xp= :xp, coins= :coins WHERE username = :user", [
"level" => $data["level"],