How to close Browser Tab After Submitting a Form?
<pre><code>&lt;?php
    /* ... SQL EXECUTION TO UPDATE DB ... */
?&gt;

&lt;form method  = "post"
      action  = "&lt;?=$_SERVER['php_self']?&gt;" 
      onSubmit= "window.close();"&gt;
  ...
  &lt;input type="submit" value="submit" /&gt;
  &lt;input type="reset"  value="reset" /&gt;
&lt;/form&gt;
</code></pre>

<p>I would like to close page after submitting the form. After running the above code the page is closed after clicking submit button, but the SQL doesn't execute.</p>

<p>Can anyone help me? Thanks in advance!</p>
