What kind of work with the form that sends the data and photos is on the client? I can do the field validation and sending of data, but here's how to collect data from the field - I have a problem downloading the files that I need to write to js for this:
html: <form id="formModel"> <input type="text" name="name"> <input type="text" name="phone"> <input type="file" id="fileOne"> <input type="submit"> </form> js: $("#formModel").submit(function() { $.ajax({ url: "send.php", method: "POST", data: { name: $("#formModel input[name='name']").val(), phone: $("#formModel input[name='phone']").val(), file: $("#formModel #fileOne").val() }, success: function(data) { $("#formModel input[name='name']").val(''), $("#formModel input[name='phone']").val(''), $("#btnSubmit").attr("value", "Отправлено") } }); return false; });