changed config.php and added delete function for administrator
This commit is contained in:
parent
99535db4ee
commit
a121e53503
10 changed files with 21 additions and 20 deletions
9
controllers/deleteUser.php
Normal file
9
controllers/deleteUser.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
$config = require('config.php');
|
||||
$db = new Database($config['database'], $config['username'], $config['password']);
|
||||
|
||||
session_start();
|
||||
if (isset($_POST['delete'])){
|
||||
$db->delete($_POST['username']);
|
||||
header("Location: /profile");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue