<?php 
    require_once('../buda_shoping_class.php');
    $scon= new buda_shoping_class();
 
 	$dD=$scon->getItemBySearch($searchValue);
	//echo $dD->rowCount(). " results found!..";
        if($dD->rowCount()>0){
           $roN=$dD->fetchAll();
          // print_r($roN=$dD->fetchAll());
?>
<center>

<table border="1" id="output" style="border-color:white;">
    
        
      

 <?php 
   foreach ($roN as $key => $rowN){ 
      $itemid=$rowN['itemid'];
      $shopid=$rowN['shopid'];
      $ownID=$rowN[''];
      $pD=$scon->getThisShopItemPrice($itemid,$shopid,$ownID);
      if($pD->rowCount()>0){
      $proN=$pD->fetchAll();
      foreach ($proN as $key => $prowN){ 
      //$nsD=$scon->getShopName($shopid);

     // $nsroN=$nsD->fetch();
          
  
        ?>

         		
            
            <tr class="tr1"><td id="td_height" ><label id="inner_top">NAME</label></td><td><label id="inner_top">CATEGORY</label></td>
              td><label id="inner_top">SHOP CATEGORY</label></td>

                <td id="td_height" ><label id="inner_top">MANUFACTURE/VENDOR</label></td>


                <td id="td_height" ><label id="inner_top">DESCRIPTION</label></td>
 
 
                <td id="td_height" ><label id="inner_top">PRICE</label></td> 

                <td  ><label id="inner_top">PLACE ORDER</label></td>
 
                </tr>

    

 <tr class="tr2"><td id="td_height" >

<form action="itemMoreDetailOtherInout.php" method="post">
<input class="hi" type="hidden" name="shopid"  value="<?php echo $rowN["shopid"];?>">

<input class="hi" type="hidden" name="itemid"  value="<?php echo $rowN["itemid"];?>">

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

 </form> </label></td>

     <td><label id="inner_lab"><?php echo $rowN["itemtype"];?> </label></td>

     <td id="td_height" ><label id="inner_lab"><?php echo $rowN["itemcategory"];?> </label></td>

     <td><label id="inner_lab"><?php echo $rowN["vendor"];?> </label></td>

     <td><label id="inner_lab"><?php echo $rowN["description"];?> </label></td>

     <td ><label id="inner_lab"><?php echo $prowN["price"];?> </label></td>
  
     </td>
<td>
  <form action="../home.php" method="post">
 
<input class="hdf" type="submit" value="Order Now" name="post"  >

 </form>
</td>
     
   </tr> 
         		
        </table>

        </center>
          
 
   
<?php
  
}
}
else{
?>
<center>
     <table class ="roomtab">
  


          <tr class="tr2">
            <td colspan="2" align="center"><label id="min_lab"><?php echo $searchValue;?> not found!..</label></td>
          </tr>

     </table>
  </center>
<?php

}//CLOSE IF OF BUTTON POST
 }
}



?>