-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrmv_mem.php
More file actions
44 lines (43 loc) · 1.1 KB
/
Copy pathrmv_mem.php
File metadata and controls
44 lines (43 loc) · 1.1 KB
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
34
35
36
37
38
39
40
41
42
43
44
<?php
session_start();
require_once 'include/db.php';
if(isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true)
{
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
$stmt = $con->prepare("DELETE FROM `members` WHERE `fac_id` = ?");
$stmt->bind_param("s",$fac_id);
$fac_id = $_POST['member'];
if(isset($_POST['sure']))
{
if($stmt->execute())
{
echo "success";
exit();
}
else
{
echo "error";
exit();
}
}
else
{
echo "notsure";
exit();
}
}
else
{
echo "error";
exit();
}
}
else
{
$_SESSION['message'] = "You are logged out. Please login to continue!";
$_SESSION['type'] = "danger";
header("Location: ./index.php");
exit();
}
?>