How to populate the html table when date is set

     

I'm trying to make a table which will get populated with data according to the search date. My search is working but the problem I'm having is how to get all that data into HTML table.


Below is my code which kept trying different ways.


HTML:


if (isset($_REQUEST["date"])){   $getJobs = "SELECT * FROM usertimetrack WHERE jDate = :jDate";   $getJobsQuery = $dbConnect -> prepare($getJobs);   $getJobsQuery -> bindParam(':jDate' $_REQUEST["date"]);   $getJobsQuery -> execute();  }
//$getJobs = "SELECT * FROM usertimetrack ORDER BY utId ASC";  //$getJobsQuery = $dbConnect -> query($getJobs);  ?>
  
     
               

  
     
              
  
                                                      fetch(PDO::FETCH_ASSOC)) { ?>                                                  
IDUser NameCategoryClientStart TimeEnd TimeTime SpentVolumeProd. LinesRemarks
" />" />
  
  
  
      

I have tried to use the below JavaScript submit the data to the same page it does work according to the browser console but it doesn't get loaded into the visible page.


JavaScript:


function getData(){
var date = document.getElementById("dPicker").value;
if(window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest();
}else{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");   }
xmlhttp.open("POST""../functions/editTimeEntry.php?date="+date