<?php  
if(isset($_POST["hotel_name"])){
	$hnm=$_POST["hotel_name"];
include("buda_connect.php");

$stmt=$pdo->prepare("select hotel_id,hname,country,city,ltown_city,lstreet_vil,paddress,email from hotel where hotel_id=:Id");
if($stmt){


$stmt->bindParam(":Id",$hnm);
if($stmt->execute()){
	$hD=$stmt->fetch();
	
?><center>


 <table border=0 class="tabpicfulview" id="">

 </tr><tr><td > <font size=2 style="Times new roman"><b> IMAGE SHOWING <?php echo $hD["hname"]." ROOM ";?></b></td></tr> 
<?php
}
else{
	echo "Hotel not found!..".$hnm;
}
}
else{
	print_r($stmt->errorInfo());
}

	 
	  

 
$img=$pdo->prepare("select imgname,	directory from images where hotelid=:Id");


$img->bindParam(":Id",$hnm);
if($img->execute()){



	$H=0;
	while($mg=$img->fetch()){

?> 
<tr><td valign="bottom" width="10%" height="140px" ><?php echo $mg["imgname"];?><br/><img border=2 id="emgfulview" src="<?php echo $mg["directory"];?>" onclick=" $('#imgDialog').show();document.getElementById('imgD').src=this.src;"  /></td></tr><?php $H++;}?>
 </table></center>
 <?php 
 
}
else{?>
	echo "No image found!..";
	
}

else{
	<tr><td><?php
	print_r($img->errorInfo());
	?></td></tr></table></center><?php
}

  }
							  

 
 ?>









  