I have a HTML form completed by the user and then submitted via the Post action into a PHP script. It validates the data and uploads the info to a DB. All good. at the end of the PHP script I want to open a bootstrap modal. i.e. without the user clicking another button to launch it. The modal I have works fine if you use the modal button like so
<button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#myModal">Open Modal</button>
I've tried a few ways to get it to run in the PHP script, this looking like the most promising:
echo '<script>$("#myModal").modal({show: true});</script>';
But no luck. I'm a complete noob when it comes to JS!