1
I need to recover parameter sent to a modal bootstrap, perform a query in the database and show result in a text field for the user, what I have is this:
Sending the parameter to the modal
<i class="icon-large icon-book" onclick="VerComentario()" IdCandidato=<?php echo $IdCandidato; ?>></i>
The call of the modal
// Chamada da janela modal para ver o Comentário
function VerComentario() {
$("#VerComentario").modal({
backdrop: false
});
$("#VerComentario .modal-header h3").html("Observação Cadastrada");
$("#VerComentario").modal("show");
}
In modal I have this SQL
<?php
$IdCandidato = $_GET['IdCandidato'];
require_once('../Connections/conCurriculoCocari.php');
$query = "SELECT * FROM observacao WHERE id_candidato = $IdCandidato ";
$result = mysql_query($query) or die ('Error (' . mysql_errno() . ') ' . mysql_error());
?>
But the parameter is not being sent, I need to receive it, send it to the modal to select and show the result to the user
Your question is not clear. The modal is a window that opens, it is not connected to the function of sending data to the server side. Who does this is AJAX. Does it make sense what I wrote? has some code/called ajax?
– Sergio
Hello @Sergio, thanks for the comment, I’m trying to do something as explained in this post, but it’s not very clear to me, see: http://stackoverflow.com/questions/11003679/dynamically-load-information-to-twitter-bootstrap-modal
– adventistapr