I want to submit both forms after click 2nd form's submit button.
The hardest part is that action is pointing to a php file with which send an e-mail to the client. I do not want to get 2 e-mails.
Both form data should reach that php file at the same time.
this is 1st form:
<form class="generalForm" id="form1" action="reservationSend.php" method="post">
    <input id="datepicker-example3" type="text" name="datepicker-example3" value="Check In">
    <input id="datepicker-example2" type="text" name="check_out" value="Choose Out">
    <select name="RoomType">
        <option selected="selected" value="0">Room Type</option>
        <option value="Deluxe">Deluxe</option>
        <option value="Family">Executive</option>
        <option value="Conference">Conference</option>
    </select>
</form>
This is the second form:
<form id="form2" class="generalForm" method="post" action="reservationSend.php" onsubmit="return submitForm()">
    <input type="text" name="name" placeholder="Your Name" />
    <input type="text" name="email" placeholder="Your email" />
    <input type="text" name="tp" placeholder="Your Phone Number" />
    <input type="text" name="Country" placeholder="Your Country" />
    <textarea name="message" placeholder="Your Message"></textarea>
    <input type="submit" name="submit" value="submit">
</form>
My javascript, myjscript.js:
function submitForm() {
    document.getElementById("form1").submit();
    document.getElementById("form2").submit();
}
 
     
    