<?php
if($_POST["iname"] && $_POST["icat"] && $_POST["ipprice"] && $_POST["isprice"] && $_POST["wsprice"] && $_POST["itemID"] && $_POST["expd"])
{ 
    $wsprice= $_POST['wsprice'];
    $isprice= $_POST['isprice'];
    $ipprice= $_POST['ipprice'];
    $icat= $_POST['icat'];
	$iname= $_POST['iname'];
    $itemID= $_POST['itemID'];
    $expd= $_POST['expd']; 
  //CHECKING ENDS HER
  require_once"labClass.php";
  $con=new labClass();
  $Q= $con->getThisItemFED($itemID,$iname);
  if($Q->rowCount()<=0)
    {
   $rQ= $con->updateItemD($iname,$icat,$ipprice,$isprice,$wsprice,$itemID,$expd);
   
   if($rQ->rowCount()>0)
      {
      ?>
      <h6 class="text-success">Save!..</h6>
      <?php
       }
       }
  else{
       ?>
        <h6 class="text-danger">Same name exist!..</h6>
       <?php
       }
       }
  else{
       ?>
       <h6 class="text-danger">All field required!..</h6>
       <?php
       }
?>