function submitPost(data, token){
    var form = document.createElement('form');
    form.method = "POST";
    form.action = "/product-delete";

    var child = document.createElement('input');
    child.name = "myId";
    child.id = "myId";
    child.value = data;
    form.appendChild(child);
            
    var child2 = document.createElement('input');
    child2.name = "_token";
    child2.id = "myId2";
    child2.value = token;
    form.appendChild(child2);
            
    document.body.append(form);

    form.submit();
}