I have the following modal window on my page:
<div class="modal fade" id="InsertProduct" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content ">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Register New Product</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<?php
include 'RegisterProduct.php';
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<a href="../MVC/Controller/RegisterNewProduct.php" title="New Register" class="btn btn-success" onclick="submitForm();"> <i class="fa fa-plus"> </i>Save Changes </a>
</div>
</div>
</div>
</div>
This modal window has a page include that inserts a product registration page in the modal window (as shown in figure 02).
.I need that, when the user clicks on the “Save Changes” button of the modal window, he sends the product registration form to my database. How can I do this since the modal window and the product registration page are two separate pages? How can I get the information from the product registration form (page that was inserted in the modal through the include), and when the user clicks the "Save Changes" button of the modal window, the information will be sent to my database dice? How can I do this?