My code works fine in this way
posts.php?id=<?php echo $post_id?; ?>
It goes to the link and shows the post.
I need to stop going in that link and show that inside the modal. How can i do it
Note: I can simply include that inside the modal but can not pass the id .
<li data-toggle="modal" data-target="#myModal"><a href="posts.php?id=<?php echo $post_id; ?>" >See post</a></li>
<div id="myModal" class="modal fade" 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">Post</h4>
</div>
<div class="modal-body">
// include the posts.php here
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>