title: Prevent access or disable some function in a certain page when some user already accessing
body: <p>I want to disable some function like hide submit button to a certain page when a remote user is currently accessing it, to prevent duplication of work.My idea to create a helper but I have no idea how to implement it</p>
  
  <pre><code> &lt;?php
  
       function isLock() {
            //disable submit button if a user currently accessing it
        }
  
        function unLock() {
            //re enable submit button if no user is accessing it
       }
  </code></pre>
  
  <p>A Javascript solution is also welcome</p>