-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelete.php
40 lines (38 loc) · 1.07 KB
/
delete.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
<?php
require_once "database_connect.php";
if (isset($_GET['appoit_id'])) {
$appoit_id=$_GET['appoit_id'];
$query3="delete from appaintments_available where id='$appoit_id'";
$run3=mysqli_query($conn,$query3);
if ($run3) {
header('Location: Add_Available_Appoitments.php');
}
else{
echo "Record not deleted";
}
}
if (isset($_GET['id_pets'])) {
$pets_id=$_GET['id_pets'];
$query="delete from pets where id=$pets_id";
$run=mysqli_query($conn,$query);
if ($run) {
echo "<script>alert('Deleted')</script>";
header('Location: List_Of_Pets.php');
}
else{
echo "<script>alert('Not Deleted')</script>";
}
}
if (isset($_GET['delete_request'])) {
$id_request=$_GET['delete_request'];
$query="delete from request_appointement where id=$id_request";
$run=mysqli_query($conn,$query);
if ($run) {
echo "<script>alert('Deleted')</script>";
header('Location: UserRequests.php');
}
else{
echo "<script>alert('Not Deleted')</script>";
}
}
?>