You are missing some semicolons and brackets. And also there should be a correction in the data parameter of ajax call. just use following code and it will work for you
$(function () {
$(".delete").click(function () {
if (!confirm('Are you sure you want to delete?')) {
return false;
} else {
$.ajax({
url: "deletemovie.php",
data: {
'movie_id': <id of the movie>
},
type: 'get',
async: false,
success: function (result) {
if (result.success) {
alert("You have successfully deleted");
}
}
});
}
});
});
Note: you have to replace the <id of the movie>
with the actual id of the movie you want to delete