-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremove.php
More file actions
24 lines (20 loc) · 716 Bytes
/
remove.php
File metadata and controls
24 lines (20 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
session_start();
if (!empty($_GET)) {
include('connection.php');
$jadual = mysqli_real_escape_string($condb, $_GET['jadual']);
$medan = mysqli_real_escape_string($condb, $_GET['medan']);
$id = mysqli_real_escape_string($condb, $_GET['userID']);
$arahan_padam = "DELETE FROM $jadual WHERE $medan = '$id'";
if (mysqli_query($condb, $arahan_padam)) {
echo "<script>alert('Data Successfully Removed');
window.location.href = 'manageuserpage.php';</script>";
} else {
echo "<script>alert('Data Remove Failed');
window.history.back();</script>";
}
} else {
die("<script>alert('Unauthorized Access');
window.history.back();</script>");
}
?>