<?php
if (isset($_POST['vendor']) && isset($_POST['description']) && isset($_POST['itemname']) && isset($_POST['itemcategory']) && isset($_POST['itemtype']) && isset($_POST['itemid'])) {
  require_once('../buda_shoping_class.php');
    $scon= new buda_shoping_class();
    $itemid=$_POST['itemid'];
    $itemcategory=$_POST['itemcategory'];
    $itemname=$_POST['itemname'];
    $itemtype=$_POST['itemtype']; 
    $vendor=$_POST['vendor'];
    $itemdescription=$_POST['description'];

 if($scon->vvendor($vendor) && $scon->vitemdescription($itemdescription) &&  $scon->vitemname($itemname) && $scon->vitemtype($itemtype) && $scon->vitemcategory($itemcategory))
      {
        ?>
         <center>
         <div>
        
        <?php   
         $r= $scon->updateItemShopDetail($vendor,$itemdescription,$itemcategory,$itemname,$itemtype,$itemid);
         if($r->rowCount()>0)
         { 
          echo "Successful!..";
           $itemcategory ="";
           $itemname="";
           $itemtype="";
           $vendor="";
           $itemdescrition="";
         }else{
          echo "Submission error!..";
          //$u=$r->ErrorInfo();
          //print_r($u);//"Error occurred while saving data!..";
              }
          
        ?> 
       </div>
       </center> 

        <?php
    
      }
      else{

        //////////////
        ?>
         <center>
         <div>
         <sup> <?php
              echo  $scon->eitemname($itemname)."<p/>"; 
              echo  $scon->eitemcategory($itemcategory)."<p/>";
              echo  $scon->eitemtype($itemtype)."<p/>";
              echo  $scon->evendor($vendor)."<p/>";
              echo  $scon->edescription($description)."<p/>";
             ?>
       </sup>
       </div>
       </center> 

        <?php
        /////////////

      }
    }else
    {
      echo "Incomplete Submission shop!..";
    }
?>