I have 2 pages, index.html and dataLoad.php. On page load, dataLoad.php loads all data for the current date and index.html displays this data on a table.
<?php include 'dataLoad.php'; ?>
On button click, a function is called that contains an AJAX that is sent to change the date variable for dataLoad.php so it loads all the data for another day and this information is stored in variables. Now I want to echo the new data values into my html using something like
document.getElementById("hour1").innerHTML = "<?php echo $hour1 ?>";
But even though the page is included, it can not import the new data (it is empty). Is there a a way to import data from the page with the new values?
Thank you for any help!