-
Notifications
You must be signed in to change notification settings - Fork 0
/
delete_member.php
33 lines (33 loc) · 1.14 KB
/
delete_member.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
//git
include "functions.php";
$message = array("text" => "", "status" => "");
$member_id = $_GET['member_id'];
$columns = array('active' => 0);
$result = updatemember("members", $columns, $member_id);
if ($result) {
$message['text'] = "Member with ID '".$member_id."' successfully deleted";
$message['status'] = "alert-success";
}else{
$message['text'] = $conn->error;
$message['status'] = "alert-danger";
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
<title></title>
</head>
<body>
<div class='col-md-12 text-center mt-1 d-flex justify-content-center align-items-center' style="height: 100vh">
<div class='alert <?= $message['status'] ?>'><?= $message['text']; ?></div>
</div>
</body>
</html>
<script type="text/javascript">
setTimeout(function(){
window.location.replace("addmembers.php");
}, 3000);
</script>