const postURL = 'http://localhost/myproject';
const frm = document.getElementById('userContactForm');
const formData = new FormData(frm);
formData.append("submit",1);
fetch(postURL, {
method: 'POST',
body: formData,
}).then(res => res.json()).then((resData) => {
console.log(resData);
frm.reset();
}).catch(error => console.warn(error));