title: Trigger bootstrap modal with PHP (not via modal button)
body: <p>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</p>
  
  <pre><code>&lt;button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#myModal"&gt;Open Modal&lt;/button&gt;
  </code></pre>
  
  <p>I've tried a few ways to get it to run in the PHP script, this looking like the most promising:</p>
  
  <pre><code>echo '&lt;script&gt;$("#myModal").modal({show: true});&lt;/script&gt;';
  </code></pre>
  
  <p>But no luck. I'm a complete noob when it comes to JS! </p>