$("#main-form").on('submit',(function(e) {
e.preventDefault();
$.ajax({
url: "post.php",
type: "POST",
data: new FormData(this),
contentType: false,
cache: false,
processData:false,
success: function(response)
{
$("#output").html(response);
}
});
}));