<?php
 
if($_POST["iname"] && $_POST["icat"] && $_POST["ipprice"] && $_POST["isprice"] && $_POST["itemID"] && $_POST["expd"])
{ 
    $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,$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
       }
 
/*if($_POST["iname"] && $_POST["icat"] && $_POST["ipprice"] && $_POST["isprice"] && $_POST["itemID"] && $_POST["expd"])
{ 
    $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->getThisItem($iname);
  if($Q->rowCount()<=0)
    {
   $rQ= $con->updateItemD($iname,$icat,$ipprice,$isprice,$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
       }*/
?>