 
 <div class="container mt-3" style="margin-top:2px;">

 <div  class="mt-4 p-5 bg-white text-dark rounded" >
  <h6>EXPENSES REGISTRATION FORM:</h6> 
     
    <div class="row">
    <div class="col">
    <div class="form-floating mb-3 mt-3"> 
      <input type="text" class="form-control" id="tname" style="height:20px;" placeholder="Expenses:"  name="tname" required>
       <label for="tname">Expenses:</label>
     <sup class="text-danger" id="in"> </sup>
    </div>
</div>
 <div class="col">
       <div class="form-floating mb-3 mt-3"> 
      <input type="number" class="form-control" id="tPrice" placeholder="Amount:" name="tPrice" required>
       <label for="tPrice">Amount:</label>
     <sup class="text-danger" id="q"> </sup>
    </div>
  </div>
    
  
 
<div class="col-sm justify-content-center">

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

</div>
</div>
</div>

</div>
 </div>
<div class="container mt-3">
<div class="row">
    <div class="col">
       <div class="form-floating mb-3 mt-3"> 
      <input type="text" onkeyup ="submision()" class="form-control" id="cname" style="height:20px; width:74%;"  name="cname" required>
       <label for="tname">Search for test:</label> 
    </div>
    </div>
  </div>
</div>
<div id="dispR">
   <?php
  require_once "exRepor.php";
  ?>
  
</div>
 
 <script>

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

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

    });
  }
 

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

var tPrice =document.getElementById('tPrice').value; 

var sdate =document.getElementById('sdate').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(  tPrice==""){ 

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

               }
else{

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

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

               }
else{

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

    });
    }
 
} 
 
 
</script>