I have the index.php, which has side by side an insert form and a table that reflects the bank, does not need to have timeout, just want it when I make a new record in the table, it will appear in the table next, without doing refresh in the page, it looks like this the method until now:
function atualizarTabela(){
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "select.php", false);
xmlhttp.send(null);
document.getElementById("tabela").innerHTML=xmlhttp.reponseText;
}
a div:
<div id="tabela"></div>
For now I'm trying to do this, but returns "undefined"
This page select.php so far only has an echo saying that it worked, for testing, but it will do select in the database and echo echo the results of the table.