I have a database.php
file where I have the following functions:
class Conexao(){
function Conexao(){}
function Inserir(){}
function Update(){}
function select(){}
function edit(){}
}
I have a pagina.php
where I list the database data in PDO , in this página.php
I have the edit , update , del and insert .
I have a script.js
which when I click the edit button calls me a modal.js
where I have the following code:
<script>
//Confirm Advanced Usage
$("#del").click(function(){
bootbox.confirm({
size: "small",
message:"Deseja mesmo deletar este Registro?",
buttons:{
confirm:{
label:'Sim, desejo!',
className:'btn-success'
},
cancel:{
label:"Não desejo!",
className:'btn-danger'
}
},
callback:function(result){
console.log(response);
}
})
});
</script>
The above script uses confirm
of bootbox.js
My question is how to make this button perform the delete function of
class Conexao(){
function Conexao(){}
function Inserir(){}
function Update(){}
function Select(){}
/*executar está função abaixo*/
function Deletar(){}
}
I can not get the function right inside the class.