 
 <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"> 
       <h6>Expenses:</h6>
      <input type="text" style="width:100%; height:40px; border-radius:12px; border-color:white;" id="tname"  placeholder="Expenses:"  name="tname" required>
     <sup class="text-danger" id="in"> </sup>
    </div>
</div>
 <div class="col">
       <div class="form-floating mb-3 mt-3"> 
        <h6>Amount:</h6>
      <input type="number" style="width:100%; height:40px; border-radius:12px; border-color:white;" id="tPrice" placeholder="Amount:" name="tPrice" onkeypress="document.getElementById('submit').disabled=false;" required>
       
     <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 id="dispR">
   <?php
  require_once "exRepor.php";
  ?>
  
</div>
 
 <script>
 

 
 function saveData(){ 
var ecc=0; 
var tname =document.getElementById('tname').value; 
$.trim(tname);
var submit =document.getElementById('submit').value;
document.getElementById('submit').disabled=true; 
var tPrice =document.getElementById('tPrice').value; 
var sdate =document.getElementById('sdate').value; 
var user =document.getElementById('user').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)
    {  
        alert('Your submitted the form!..');
        $.post("expensesRegFormPro.php",
          {submit:submit,user:user,tname:tname,tPrice:tPrice,sdate:sdate},
          function(data){
      $('#disp').html(data).show();

    });
    }
 
} 
 
 
</script>