Funguje to, děkuji všem za pomoc.
Javascript
$(document).ready(function(){
loadstation();
});
function loadstation(){
$("#station_data").load("station.php");
setTimeout(loadstation, 2000);
}
station.php
<?php
include ("database.php");
$result = mysqli_query($con, "SELECT * FROM sql347511.1 ORDER BY ID DESC LIMIT 1;");
while ($row = mysqli_fetch_array($result))
{
echo "<div class='infobox_data' id='infobox_temp'>" . $row['TEMP'] . "°C</div>";
echo "<div class='infobox_data' id='infobox_humid'>" . $row['HUMID'] . "%</div>";
echo "<div class='infobox_time'>At " . date("g:i:s a F j, Y ", strtotime($row["TIME"])) . "</div>";
}
mysqli_close($con);
?>
Kam umístit data
<div id="station_data"></div>