For example, when doing a search update a specific DIV within the site without updating the entire page.
For example, when doing a search update a specific DIV within the site without updating the entire page.
$('#botao').click(function(){
$.ajax({
type : 'post',
url : 'teste.php',
data : 'nome='+ $('#campo1').val() +'&sobrenome='+ $('#campo2').val(),
dataType : 'html',
success : function(resultado){
$('#tabela').html(resultado);
}
});
});
Not possible, for this you need a client-side language like javascript. If you use only PHP you can build the updated page and send it back to the client again.
AJAX + jQuery
Function load()
With PHP, it is not possible to use a language that works on the server.