title: call php function when browser back button clicked
body: <p>How can I call a <strong><code>PHP Function</code></strong> when <code>Browser Back button</code> clicked or <code>right click</code> then clicked BACK item then prevent page to redirect to <code>login page</code> when user is still <code>logged-in</code>.</p>
  
  <p>I found this <a href="https://stackoverflow.com/questions/15152052/pressing-back-button-redirects-the-logged-user-to-log-out"><strong><code>(Pressing back button redirects the logged user to log out?)</code></strong></a> to prevent page to redirect to other page when user clicked <strong><code>browser back button</code></strong> and user is still logged in, but I didn't know where to put those codes and how to call that function.</p>
  
  <p>Can someone explain this thoroughly to accomplish my problem or provide some <code>DEMO</code>(JSFiddle) for better understanding?</p>