<?php include("../cn.php");


// $driverid = $_REQUEST["driverid"];
$hotel_name = $_REQUEST["hotel_name"];
$hotel_address = $_REQUEST["hotel_address"];
$hotel_phone = $_REQUEST["hotel_phone"];
$hotel_email = $_REQUEST["hotel_email"];
$hotel_representative = $_REQUEST["hotel_representative"];

$query = "INSERT INTO `hotels` 
       (`hotel_name`,`hotel_address`,`hotel_phone`, `hotel_email`, `hotel_representative`) 
VALUES('$hotel_name', '$hotel_address', '$hotel_phone','$hotel_email','$hotel_representative')";

// $myfile = fopen("testfile.txt", "w");
// fwrite($myfile, $query);
// fclose($myfile);

$result1 = mysqli_query($connect, $query);
$result2;

$id = mysqli_insert_id($connect);

header("location:../hotels.php");

?>