Personal I have a candidate registration form. To save to the database it passes the values through the javascript to salvaCandidato.php . I'm trying to make sure that when I send the form the modal appears saying the subscription protocol that is in the $ nr_prot variable in SavedCandidate.php , I can not.
index.php
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">Observação</h4>
</div>
<div class="modal-body">
<h4>Anote seu protocolo</h4>
<h4>$nr_prot</h4>
<h4> O protocolo foi enviado para o email </h4>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
</div>
salvaCandidato.php
$sqlProt = "SELECT * FROM candidato WHERE cpf_cand = '$_POST[cpf_cand]'";
$queryProt = mysqli_query($conexao,$sqlProt);
$fetchProtocolo = mysqli_fetch_assoc($queryProt);
$nr_prot = $fetchProtocolo['nr_prot'];