-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcancelTicket.php
More file actions
24 lines (21 loc) · 841 Bytes
/
cancelTicket.php
File metadata and controls
24 lines (21 loc) · 841 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
include 'connection.php';
session_start();
if (isset( $_SESSION['user_id'])) {
$idh=$_SESSION['user_id'];
} else {echo 'session expired.';
header("Refresh:0; URL=expiredsess.php");
die();
}
$tid=$_GET['ticketid'];
$sql = "update bookings set cancel_status=0 where ticketID='$tid'";
$result = $conn->query($sql);
if ($result) {
echo "ticket cancelled...!";
header("Refresh:0.5; URL=bookings.php");
}
else {
echo "<script type='text/javascript'> { window.location.replace('bookings.php');alert('Ticket was not cancelled due to some unknown reasons..sorry for inconvenience.');} </script>";
}
$conn->close();
?>