Open a bootstrap modal

Replace this area with the following code:

//try block  above
?>

<script>
   $('#thankyouModal').modal('show');
</script> 

<?php
//catch block area

Since bootstrap modal is called at the client side, it can’t be called like PHP function. So, we have make such adjustments.