title: Sweetalert2 redirection
body: <p>I'm struggling with this for a few hours already and I think that the solution is very simple. First a bit of background.</p>
  
  <p>So, I have a php page where I can enter a number in a texfield. If the number entered is higher than the credit the user has, then I have to show an error message. When the user clicks on the button to send the form, I go to makeTransfer.php and I do several checks in here. If, as I said, the user has not credit enough I want to show him an error message using SweetAlert2 and then redirect him to the previous page (let's call it cashier). At the moment, I can show the alert but I'm unable to redirect him :(.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>echo '&lt;script type="text/javascript"&gt;';
  echo 'setTimeout(function () { swal("WOW!","Message!","error");';
  echo '});&lt;/script&gt;';
  </code></pre>
  
  <p>Any help, please? I just want to show the alert, and as soon as the user clicks on Accept button, redirects him to cashier.php</p>
  
  <p>Thanks in advance!</p>