I have 1 Modal in the file called myModal.php. I want to call this file from the index.php without redirecting it to myModal.php, that is, the mode (myModal.php) is executed, remaining in the index of the page.
I have tried with the code that I share below, but redirects me to the myModal page and it is not what I want, since I want to stay on the page from which I make the call.
Thank you for your attention.
//Archivo index.php
<div class="container">
<div class="col-md-10 col-md-offset-1 text-center js-fullheight slider-text">
<div class="slider-text-inner">
<p><a data-toggle="modal" data-target="myModal.php#myModal" class="btn btn-primary btn-lg">¡Solicita tu Reserva!</a></p>
<br>
</div>
</div>
</div>
// File myModal.php
<?php
require "class/Db.class.php";
require "class/Conf.class.php";
$bd = Db::getInstance();
?>
<div class="container">
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">My Modal</h4>
</div>
</div> <!-- fin modal-content -->
</div> <!-- fin modal-dialog -->
</div> <!-- fin modal-fade -->