-
Notifications
You must be signed in to change notification settings - Fork 0
/
Process.php
36 lines (32 loc) · 946 Bytes
/
Process.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
case 'edithotel':
if(empty($_POST['hotel_id']) || !is_numeric($_POST['hotel_id']) || $_POST['hotel_id'] < 1) {
die();
}
$id = $_POST['hotel_id'];
$name = $_POST['hotel_name'];
$desc = $_POST['hotel_desc'];
$stars = $_POST['hotel_stars'];
$phone = $_POST['hotel_phone'];
$email = $_POST['hotel_email'];
$website = $_POST['hotel_website'];
$street = $_POST['hotel_street'];
$street_no = $_POST['hotel_street_no'];
$postcode = $_POST['hotel_postcode'];
$city = $_POST['hotel_city'];
$data = array(
"HOTEL_NAME" => $name,
"HOTEL_DESCRIPTION" => $desc,
"HOTEL_STARS" => $stars,
"HOTEL_PHONE" => $phone,
"HOTEL_EMAIL" => $email,
"HOTEL_WEBSITE" => $website,
"HOTEL_STREET" => $street,
"HOTEL_STREET_NO" => $street_no,
"HOTEL_POSTCODE" => $postcode,
"HOTEL_CITY" => $city
);
$where['HOTEL_ID'] = '='.$id;
$database = new Database();
$database->updateRows("HOTEL", $data, $where);
header('Location: index.php');
break;