http://www.dollarfry.com/how-to-submit-multiple-forms-with-jquery-ajax-and-html5-validation/
<script>
$(document).ready(function() {
$("form").submit(function() {
// Getting the form ID
var formID = $(this).attr('id');
var formDetails = $('#'+formID);
$.ajax({
type: "POST",
url: 'process.php',
data: formDetails.serialize(),
success: function (data) {
// Inserting html into the result div
$('#sonuc').html(data);
},
error: function(jqXHR, text, error){
// Displaying if there are any errors
$('#sonuc').html(error);
}
});
return false;
});
});
</script>