title: log out confirmation box in javascript
body: <p>I have a php code for logout page but i need to have a confirmation box pop-up first if i click the navigation box to logout...if  I want to logout or not...can any1 help me?? please</p>
  
  <p>code:</p>
  
  <pre><code>&lt;?php
  include("connection.php");
  
  
  // Delete certain session
  unset($_SESSION['username']);
  // Delete all session variables
  // session_destroy();
  $uid = $_POST['uid'];
      $stat="UPDATE users SET status='logout'";
          mysql_query($stat); 
  // Jump to login page
  header('Location: index.php');
  
  
  ?&gt;
  </code></pre>