-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
70 lines (54 loc) · 1.25 KB
/
Copy pathdelete.php
File metadata and controls
70 lines (54 loc) · 1.25 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
$Hostel_id='';
include("../config/config.php");
if(isset($_POST['delete_Hostel'])){
delete_Hostel();
}
function delete_Hostel(){
global $db,$Hostel_id;
$Hostel_id=$_POST['Hostel_id'];
$sql="DELETE from Hostel_photo where Hostel_id='$Hostel_id'";
$query=mysqli_query($db,$sql);
if($query){
$sql2="DELETE from review where Hostel_id='$Hostel_id'";
$query2=mysqli_query($db,$sql2);
$sql3="DELETE from add_Hostel where Hostel_id='$Hostel_id'";
$query3=mysqli_query($db,$sql3);
if($query3){
?>
<style>
.alert {
padding: 20px;
background-color: #DC143C;
color: white;
}
.closebtn {
margin-left: 15px;
color: white;
font-weight: bold;
float: right;
font-size: 22px;
line-height: 20px;
cursor: pointer;
transition: 0.3s;
}
.closebtn:hover {
color: black;
}
</style>
<script>
window.setTimeout(function() {
$(".alert").fadeTo(1000, 0).slideUp(500, function(){
$(this).remove();
});
}, 2000);
</script>
<div class="container">
<div class="alert" role='alert'>
<span class="closebtn" onclick="this.parentElement.style.display='none';">×</span>
<center><strong>Your Product has been deleted.</strong></center>
</div></div>
<?php
}
}}
?>