title: Destroy PHP SESSION in Javascript Function
body: <p>I create a <code>session</code> in my <code>php</code> script.<br>
  I want to destroy my <code>php session</code> in javascript.<br>
  when I click on <code>Destroy Session</code> then javascript function <code>destroy()</code> call and destroy <code>SESSION['user']</code>.</p>
  
  <pre><code> &lt;?php
      ob_start();
  session_start();
      SESSION['user'] = "test 123";
      echo "&lt;a onClick = 'destroy()'&gt;Destroy Session&lt;/a&gt;";
   ?&gt;
  
    &lt;script&gt;
        Function destroy(){
         session_destroy();  // Like `PHP` I want destroy Session in `javascript`
        }
    &lt;/script&gt;
  </code></pre>