deleteMemberAction.php
669 Bytes
<?php
session_start();
if($_SESSION['name']){
}else header('Location: index.php');
require_once 'include/DB_Functions.php';
$db = new DB_Functions();
if (isset($_GET['username'])){
// receiving the post params
$username = $_GET['username'];
// Delete user
if ($db->deleteUser($username)) {
// user existed, delete
echo "User: " . $username . ", was deleted" . "<p>";
echo "<a href='workArea.php'>Click here to continue</a>";
} else {
echo "User: " .$username . ", doesn't existe!"."<p>";
echo "<a href='workArea.php'>Click here to continue</a>";
}
} else {
die ("Required parameters username is missing!");
}
?>