title: Handling retry post requests in php, when both post requests reach the server
body: <p>Users of my php application sometimes accidentially submit messages or other actions twice without wanting to. This seems to be an issue caused by (mobile) clients automatically retrying a request if the response takes too long, e.g. due to bad network connection. My server though handles both requests and processes them as seperate actions.</p>
  
  <p>How can I handle such retry post requests without disabling the possiblity of sending deliberate double post requests? Therefore how can i distinguish between these retries and deliberatly user-send resends  of the same request?</p>
  
  <p>A bit of context, that could help understand the problem: I'm running a oldschool html-based browser game. Users may want to resend the exact same action like "attack" multiple times through page refresh delibaretly and I do not want to cut this option, as it's really convenient. But I want to prevent unintended double actions through clients automatically sending post requests twice without asking the user first. I'm not entirely sure if its a mobile browser specific problem.</p>