Everything is good, working, but is this a good way to refresh some data to display in the index, any suggestion will help
$(document).ready(function () {
setInterval(function () {
$.ajax({
url: 'dashboard/reserv_load_today.php',
success: function (data) {
var json = JSON.parse(data);
$('#reserve_today').html(json.TODAY);
}
})
$.ajax({
url: 'dashboard/last_update.php',
success: function (data) {
var json = JSON.parse(data);
$('#last_update').text(json.LAST);
}
})
}, 3000);
});