I have to open a form in a modal using bootstrap and when I send it I want to receive the data without closing modal
I open the modal like this:
<a data-toggle="modal" data-target="#modalEMP" href="consulta.php">Consultar CNPJ</a>
The query.php file has the following form:
<form id="formulario" action="resultado.php" method="post">
<input type="text" name="CNPJ" id="CNPJ" maxlength="19" required />
<input id="submit" name="enviar" type="submit" value="Consultar" />
</form>
In this way, when sending the form, the modal closes automatically. I want the post to be sent and show me the resultado.php page in the same modal.