<?php
//DB Data
include '../../ASEngine/AS.php';
if(!$login->isLoggedIn())
    header("Location: ../../login.php");
$user = new ASUser(ASSession::get("user_id"));
$userInfo = $user->getInfo();

//basic include files
require_once("../../../db.php");

//variables
$room_id = $_POST['room_id'];
$room_name = $_POST['room_name'];
$hotel_id = $_POST['hotel_id'];
$hotel_name = $_POST['hotel_name'];
$room_type_name = $_POST['room_type_name'];
$room_type_short_description = $_POST['room_type_short_description'];
$room_type_description = $_POST['room_type_description'];
$room_type_capacity = $_POST['room_type_capacity'];
$max_adults = $_POST['max_adults'];
$max_kids = $_POST['max_kids'];
$room_type_inventory = $_POST['room_type_inventory'];

mysqli_query($conn, "UPDATE hotel_room_type SET room_type_name = '$room_type_name', room_type_short_description = '$room_type_short_description', room_type_description = '$room_type_description', room_type_capacity = '$room_type_capacity', max_adults = '$max_adults', max_kids = '$max_kids', room_type_inventory= '$room_type_inventory' WHERE room_type_id = '$room_id' ");


mysqli_close($conn);

header("Location: ../../manage-room.php?roomid=".$room_id."roomname=".$room_name."hotelid=".$hotel_id."hotelname=".$hotel_name);
?>