 
 
 <div class="container mt-3" style="width:100%;">

 <div  class="mt-4 p-5 bg-white text-dark rounded">
  <h6>LAB ITEM AND TOOLKIT REGISTRATION FORM:</h6> 
     
    <div class="row">
    <div class="col-xl" >
    <div class="form-floating mb-3 mt-3" style="width:100%;"> 
      <input type="text" class="form-control" id="iname" value="<?php echo $con->vIname($iname);?>"style=" width:100%; height:20px;" placeholder="Item name" name="iname" required>
       <label for="iname">Item name:</label>
      <sup class="text-danger" id="in"><?php echo $con->eIname($iname);?> </sup>
    </div>
</div>
 <div class="col"  >
       <div class="form-floating mb-3 mt-3"> 
      <input type="number" class="form-control" value="<?php echo $con->vIqty($iQty);?>"  id="iQty" placeholder="Item Qty" name="iQty" required>
       <label for="iQty">Item Qty:</label>
     <sup class="text-danger" id="p"><?php echo $con->eIqty($iQty);?></sup>
    </div>
  </div>
   
 
<div class="col-sm justify-content-center">

  <div class="form-floating mb-3 mt-3"> 
  <button type="submit" class="btn btn-primary" style="height:60px;" onclick="saveData()">Submit</button>

</div>
</div>
</div>
<!--SEARCH BOX-->
   <div class="row">
    <div class="col">
      <h6>SEARCH TOOL KIT FOR UPDATE:</h6>
    <div class="form-floating mb-3 mt-3"> 
      <input type="text" onkeyup ="submision()" class="form-control" id="tname" style="width:74%; height:20px;" placeholder="Test name" name="tname" required>
       <label for="tname">Search for test:</label> 
    </div>
</div> 
</div>

<!-- SEARCH BOX END-->

</div>

 </div>
  
   
      
<div id="dispR"></div>
 

 <script>

  function submision(){
    
    var searchValue=$('#tname').val();

    
 ;
    $('#dispR').empty();
    $.post('mTestList.php',{searchValue:searchValue},function(data){
      $('#dispR').html(data);

    });
  }
 

 
 function saveData(){ 
var ecc=0; 
var iname =document.getElementById('iname').value; 
$.trim(iname);
var submit =document.getElementById('submit').value;

var iQty =document.getElementById('iQty').value; 
  
var vN =/[\(A-Za-z)]/g; 

var nV =/[a-z\s]/i;
  var j=0,k=0, g=0,i=0;

                                                         //FIRST NAME VALIDATION
  
if(  iQty==""){ 

         ecc++;
             document.getElementById('q').innerHTML="Quantity is required!..";
 

               }
else{

document.getElementById('q').innerHTML="";
    }
     
if(  iname==""){ 

         ecc++;
             document.getElementById('in').innerHTML="Item name is required!..";
 

               }
else{

document.getElementById('in').innerHTML="";
    }
  
    if(ecc==0)
    { 
        $.post("toolkitRegPro.php",
          {submit:submit,iname:iname,iQty:iQty},
          function(data){
      $('#disp').html(data).show();

    });
    }
 
} 
 
 
</script>
 