-
Notifications
You must be signed in to change notification settings - Fork 5
/
status.php
40 lines (35 loc) · 1.35 KB
/
status.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
session_start();
$con=mysqli_connect('localhost','root','','hotelmanagement');
$Sno = (isset($_POST['SNo']) ? $_POST['SNo'] : 'error');
//$name=$_SESSION['name'];
if(isset($_POST['accept']))
{
$query="UPDATE events SET Status =true WHERE SNo='$Sno'";
mysqli_query($con,$query);
echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://localhost/new/admin.php#event">';
}
else if(isset($_POST['pay']))
{
$query="UPDATE events SET Status ='paid' WHERE SNo='$Sno'";
mysqli_query($con,$query);
echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://localhost/new/appointment.php#event">';
}
else if(isset($_POST['reject']))
{
$query="UPDATE events SET Status =false WHERE SNo='$Sno'";
mysqli_query($con,$query);
echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://localhost/new/admin.php#event">';
}
else if(isset($_POST['delete']))
{
$query="DELETE FROM events WHERE SNo ='$Sno'";
mysqli_query($con,$query);
echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://localhost/new/admin.php#E-expired">';
}
else {
$query="UPDATE events SET Status ='cancel' WHERE SNo='$Sno'";
mysqli_query($con,$query);
echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://localhost/new/appointment.php#event">';
}
?>