Hocam 2. soru için kodlarım .
function i_submit() {
$("form#data").submit(function(e){
e.preventDefault();
var formData = new FormData($(this)[0]);
$('#result').stop().html('').fadeIn();
$.ajax({
url: "functions.php?cr=i_submit",
type: "POST",
data: formData,
dataType: "json",
cache: false,
contentType: false,
enctype: 'multipart/form-data',
processData: false,
success: function (reply) {
if (reply.error) {
$("#result").html(reply.error).fadeIn(1000);
} else if (reply.succes) {
$("#result").html(reply.succes).fadeIn(1000);
} else {
}
}
});
return false;
});
}