Question:
After registering (within a modal), the table must be updated automatically. But I can not. OBS.: Languages I'm using are PHP and JS.
In jsfiddle, there is a small demo, in the JS tab is the code (else) I'm trying to do to update the bootstrap-table query.
https://jsfiddle.net/andrealbson/yydc9nv0/23/
Answer:
You can use ajax:
$("#adicionar").click(function()
{
$.ajax({
type: 'POST',
url: 'adicionar.php',
success: function(data)
{
$(".table").append(data);
}
});
});
#add -> The id of a button that must be included to execute the action
Type -> Method of sending information
URL -> The function made in php that will be responsible for including in your table
.Table -> the class of the table where the result of the previous function will be sent
To show the information you can use an echo
, there you go.