title: How to clear the session using a button and javascript
body: <p>Session is client side staff, but is it possible through clear it using javascript code?
  I would like too have the idea like this and ,can it convert  to jquery format? Thank you.</p>
  
  <p>js</p>
  
  <pre><code>    $(function(){
    $("#closeTab").click(function() {
      window.parent.$('#tt').tabs('close','Create List');
          $.post("clear.php",function(data){
        });
    });
  });
  </code></pre>
  
  <p>php</p>
  
  <pre><code>    &lt;?
  if (isset($_SESSION['lname']))
  unset($_SESSION['lname']);
  if (isset($_POST['creminder']))
  unset($_SESSION['creminder']);
  ?&gt;
  </code></pre>
  
  <p>Is this one ok ?</p>