-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathout.php
27 lines (22 loc) · 883 Bytes
/
out.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
<?php
if (isset($_GET['id']))
{
$con = mysql_connect("localhost", "root", "");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("argie_tamera", $con);
$messages_id = $_GET['id'];
$result3 = mysql_query("SELECT * FROM reservation where reservation_id ='$messages_id'");
while($row3 = mysql_fetch_array($result3))
{
$res=$row3['confirmation'];
}
$update1=mysql_query("UPDATE reservation SET status ='out' WHERE reservation_id ='$messages_id'");
$update2=mysql_query("UPDATE roominventory SET status ='out' WHERE confirmation = '$res'");
header("location: home_admin.php#1");
exit();
mysql_close($con);
}
?>