here is the problem i try to read some articles but it doesnt work
*I already included the java script in my php file it works when i trigger the modal using button but echoing it in php doesnt**
if(!isset($_SESSION ["id"])){
echo "<script>$('#loginModal').modal('show')</script>"; }
My modal
<div id="loginModal" class="modal fade" role="dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<p>Some text in the modal.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>