1
My doubt is the ajax URL, I want to know how to access the function of my class
Ajax with jQuery
$.ajax({
type:'post',
url: "Usuario.php?apagar",
data: {titulo: 'Ola mundo'},
success: function( data ){
$('#ajax').text(data);
},
error: function(){
alert('Houve algum erro no ajax');
}
});
PHP
class usuario extends geral
{
function apagar(){
echo $_POST['titulo'];
}
}
I have no idea what the URL looks like in Ajax.
No man, these topics that you are marking are not helping me :/
– Pedro Soares