<table width="100%"> 
<tr><td>

<?php 
  $pdo=$con->getHotelBySearch($searchValue);
 
  $va=$pdo->fetchAll();
 
  if($pdo->rowCount()>0){
    echo $pdo->rowCount(). " results found!..";
?>
<ul class="homeD">
<?php
$avH=0;
foreach ($va as $key => $row) {
	
	$hnm=$row["hotel_id"];
    //$ownID=$row["owner_id"];; 
    $h=$con->getHotelInfo($hnm);
    $hD=$h->fetch();

        $current="current";
           
          $HP=$con->getHotelProfileImages($hnm);
          if($HP->rowCount()>0)
            {
            $hmgp=$HP->fetch();
            $hProfile=$hmgp['directory'];
            }
          else
            {
            $hProfile='hotel_images/defaultHotelimg.png';
            }
	 ?>
<li id="liMg"><form action="hotelServiceInfoInOther.php" method="post">
<input class="hi" type="hidden" name="hiD"  value="<?php echo $row["hotel_id"];?>">

<input class="hi" type="hidden" name="owniD"  value="<?php echo $ownID;?>">

<input class="hdf" type="submit" value="<?php echo $row["hname"];?>" name="post"  >

 </form><p/>
<?php
if($hProfile!=""){
	?>
   <img id="pic" src="<?php echo $hProfile;?>">
   <?php
   
}

?>
<small>Location:<br><i> <?php echo $row["country"]."->".$row["city"]."->". $row["ltown_city"]."->". $row["lstreet_vil"];?> </small></i>
</li>

 

<?php
$avH++;
 
}
}
else{
	 echo $searchValue." not found!.."; 
}
?>
</ul> 
</td></tr>
  
</table>