-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_action.php
59 lines (43 loc) · 1.37 KB
/
admin_action.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
require_once("database.php");
// delete employers
if (isset($_GET['emp_name'])) {
$uname=$_GET['emp_name'];
$q="DELETE FROM employer_table WHERE username='$uname'";
$r=mysqli_query($connect,$q);
// echo $id;
if(!$r){
echo "<script>alert('Not Deleted')</script>";
echo "<script>location='employer_list.php'</script>";
}else{
// echo "<script>alert('Application Deleted')</script>";
echo "<script>location='employer_list.php'</script>";
}
}
// delete users
if (isset($_GET['user_name'])) {
$user_name=$_GET['user_name'];
$q="DELETE FROM user_table WHERE username='$user_name' ";
$r=mysqli_query($connect,$q);
// echo $id;
if(!$r){
echo "<script>alert('Not Deleted')</script>";
echo "<script>location='user_list.php'</script>";
}else{
echo "<script>location='user_list.php'</script>";
}
}
// delete users
if (isset($_GET['apply_id'])) {
$app_id=$_GET['apply_id'];
$q="DELETE FROM apply_table WHERE id='$app_id' ";
$r=mysqli_query($connect,$q);
// echo $id;
if(!$r){
echo "<script>alert('Not Deleted')</script>";
echo "<script>location='applied_history.php'</script>";
}else{
echo "<script>location='applied_history.php'</script>";
}
}
?>