title: PHP Double-Click Dilemma
body: <p>We have a problem with users double-clicking on buttons within our application to proceed from screen to screen. </p>
  
  <p>We have implemented the ( <code>onclick="this.disabled=true"</code> ) on our buttons but we are convinced that it is not always sufficient to stop the fast-fingered double-click.</p>
  
  <p>A simple example :-</p>
  
  <p>Screen A has four input fields and a proceed button.  When the proceed button is pressed, control is passed to server-side routine to validate info, set some session vars and call screen B.</p>
  
  <p>What appears to happen occasionally is :-</p>
  
  <p>On first click the server-side routine is called and begins validating info and setting session vars. Second-click takes control and again calls the server-side routine and begins validating info and setting session vars -> for us, the session vars are already set and this highlights the problem.</p>
  
  <p>We have looked at tokens but don't think they will solve our problem.  </p>
  
  <p>We think that since every PHP application must be vulnerable to this double-click issue there has to be a standard method for resolving it but we have yet to find one. </p>
  
  <p>If you have resolved this issue then we would be grateful if you would like to give us some insights into how we might overcome the problem.</p>
  
  <p><em>*</em> Thanks for the replies. Loic and Brian Nickel - hard to separate as both going for the token method via timestamp or GUID. We will have to go back and take another look at tokens.  After discussion - as a preferred solution for us, we would go with the GUID token concept.</p>