So I have code to show the unique title whenever icon clicked and showing on modal.
<a style="background-color:#5a85dd; color:white; padding:10px; border-radius:10px; margin-top:20px; " data-toggle="modal" data-target="#popUp" onClick="showModal(<?php echo $id; ?>)">
and I called the title based on id with <p id="title"></p>
the problem is, I want to store title value to make sql query, but I still cant figure it out how.
here is the javascript showModal().
<script>
function showModal(id)
{
$("#title").text($("#title"+id).text());
}
</script>