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

 <div  class="mt-4 p-5 bg-white text-dark rounded">
  <h6>Register code disease:</h6> 
     <div id="dispco"></div>
    <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="disease" style=" width:100%; height:20px;" placeholder="Disease" name="disease" required>
       <label for="disease">Disease:</label>
      <sup class="text-danger" id="de"> </sup>
    </div>
</div>
 <div class="col">
       <div class="form-floating mb-3 mt-3"> 
      <input type="text" class="form-control"   id="code" placeholder="Code" name="code" required>
       <label for="code">Code:</label>
     <sup class="text-danger" id="co"> </sup>
 </div>
</div> 
<div class="col">

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

</div>
</div>
</div>
<!--SEARCH BOX-->
   <div class="row">
    <div class="col">
      <h6>Search here:</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:</label> 
    </div>
</div> 
</div>

<!-- SEARCH BOX END-->

</div>

 </div>
 <div id="dispR">
   
 <?php
   require_once "codeDiseaseList.php";
   ?>
   
 </div>
 
 <script>

  function submision(){
    var searchValue=$('#tname').val();
    $('#dispR').empty();
    $.post('codeDiseaseBySeach.php',{searchValue:searchValue},function(data){
      $('#dispR').html(data);

    });
  }
 

 
function saveData(){ 
var ecc=0; 
var code =document.getElementById('code').value; 
$.trim(code);
var disease =document.getElementById('disease').value; 
$.trim(disease);
var submit =document.getElementById('submit').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(code==""){ 
         ecc++;
      document.getElementById('co').innerHTML="Code is required!..";
           }
else{
document.getElementById('co').innerHTML="";
    }
   if(disease==""){ 
   ecc++;
   document.getElementById('de').innerHTML="Disease is required!.";
               }
else{

document.getElementById('de').innerHTML="";
    }  
if(ecc==0)
    { 
    $.post("codeDiseaseRFPro.php",
    {submit:submit,code:code,disease:disease},
          function(data){
      $('#dispco').html(data).show();
    });
    document.getElementById('code').value=""; 
    document.getElementById('disease').value="";
    }
} 
</script>
 