title: How to redirect page after click on Ok button on sweet alert?
body: <p>I am able to display sweet alert after the page refresh but I have to click on Ok button which I am getting on sweet alert to redirect the page.Please help  me in this.</p>
  
  <pre><code>&lt;?php
      echo '&lt;script type="text/javascript"&gt;';
      echo 'setTimeout(function () { swal("WOW!","Message!","success");';
      echo '}, 1000);'
      echo 'window.location.href = "index.php";';
      echo '&lt;/script&gt;';
  ?&gt;
  </code></pre>