-
Notifications
You must be signed in to change notification settings - Fork 0
/
removeacc.php
39 lines (37 loc) · 988 Bytes
/
removeacc.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
<!DOCTYPE html>
<html lang="en">
<title>
Delete
</title>
<head>
<body>
<div>
<form action="" method="POST">
<div>
<input type="text" id="title" name="title" placeholder="Enter Your Title" require="required"><br><br>
</div>
<div>
<input type="submit" name="submit" value="Unpublish">
</div>
</form>
</div>
</body>
</head>
</html>
<?php
include "dbcon.php";
$query = "select * from post";
if(isset($_POST['submit'])){
$title=$_POST['title'];
if(mysqli_query($con,"DELETE FROM login_page_ WHERE username='".$title."'")){
echo "Account Removed Successfully";
}else{
echo "";
}
if(mysqli_query($con,"DELETE FROM perm_admin WHERE username='".$title."'")){
echo "all permission removed successfully";
}else{
echo "";
};
}
?>