How can I submit a particular button by jQuery without submitting other buttons in the same form
I want to post the delete button only when I click yes in jQuery confirmation box
$(document).ready(function(){
$( "#dialog:ui-dialog" ).dialog( "destroy" );
$( "#dialog-confirm" ).dialog({
resizable: false,
height:140,
modal: true,
buttons: {
"Ok": function() {
$('#form1').submit();
//*****************************************************************
},
Cancel: function() {
$( this ).dialog( "close" );
}
}
});
});
Here I want to post only delete button in php without submitting whole form
$('#form1').submit();
What is the modification needs to be done in this code?
My PHP code
if(isset($_POST['delete_btn']) && $_POST['delete_btn']=='Delete' ){
$rid=$_POST['roleid'];
$sql_u="SELECT * FROM `user_mst` WHERE `role_id`=".$rid;
mysql_query($sql_u,$conn) or die("Unable to execute query :". mysql_error());
}