<?php
$id=$_POST['id'];
require_once "config.php";
$sql="delete from hotels where id='".$id."'";
$query=mysqli_query($con,$sql);
if($query==false){
    die(mysqli_error($con));
}
$sql="delete from rooms where hotel_id='".$id."'";
$query=mysqli_query($con,$sql);
if($query==false){
    die(mysqli_error($con));
}
echo mysqli_affected_rows($con)
?>