i am trying to submit 2 forms at the same time
im trying to send 1 form to my DB and the other to a different site
my code is like :
function submitform(){
document.forms["form2"].submit();
document.forms["form1"].submit();
}
<form name="form1" action="1.php" method="post">
<!-- ... -->
</form>
<form name="form2" action="2.php" method="post" target="foo">
<!-- ... -->
</form>
<a onclick="submitform();">Go</a>
now if i submit only form2 it opens in a new tab and works but when i try to submit both of them it only submits form1
i have no idea why
any help would be appreciated
thank you
Marc B‘s comment
is the answer for me.